Jump to content
  • 0

Question

Posted

Problema intalnita (descriere):Am facut un chat report la /opr sa se deschia si la /cpr sa s inchia insa nu ii trimite mesajul si celui carui i-am deschis report imi apare doar mie si apare gresit..
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):

if(IsInChat[playerid] == 1)
	{
    foreach(Player, i)
    {
       if(IsInChat[i] > 0)
       {
           if(PlayerInfo[playerid][pAdmin] > 1)
		 {
		   format (string,sizeof ( string ), "( ! )Administrator:%s", GetName(playerid), text);
		   SendClientMessage(playerid, 0x6633CCFF, string);
   		}
   		if(PlayerInfo[playerid][pTrial] > 1)
		 {
		   format (string,sizeof ( string ), "( ! )Asistent:%s", GetName(playerid), text);
		   SendClientMessage(playerid, 0x6633CCFF, string);
   		}
   		{
		   format (string,sizeof ( string ), "( ! )Jucator:%s", GetName(playerid), text);
		   SendClientMessage(playerid, 0x6633CCFF, string);
   		}
       }
    }
}


Imagini / Video (optional):http://i.imgur.com/E2m6QHn.png
Ati incercat sa rezolvati singur?:Da..

7 answers to this question

Recommended Posts

  • 0
Posted

Mda..tot am problema.Eu am helper 3 insa imi arata si scrisul de la 1 2. in plus unde este [] ar trebui sa arate id-ul insa nu o face si imi mai si arata ca mi-a raspuns jucatorul dar apare pe numele meu.

Asta e ce vad eu:

http://imgur.com/MHyUZvc

Asta e ce vede un user normal:

http://imgur.com/SnRPPnb

		return 0;
	}
  	if(IsInChat[playerid] == 1)
	{
    foreach(Player, i)
    {
       if(IsInChat[i] > 0)
       {
       	if(PlayerInfo[playerid][pAdmin] > 1)
		 {
		   format (string,sizeof ( string ), "( ! )Administrator:[%s][%s]", GetName(playerid), text);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		if(PlayerInfo[playerid][pAdmin] > 8)
		 {
		   format (string,sizeof ( string ), " * (R)Administrator(8)%s[%s]:%s(R: %s[%s])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		if(PlayerInfo[playerid][pTrial] > 1)
		 {
		   format (string,sizeof ( string ), " * (R)Asistent(1)%s[%s]:%s(R: %s[%s])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		if(PlayerInfo[playerid][pTrial] > 2)
		 {
		   format (string,sizeof ( string ), " * (R)Asistent(2)%s[%s]:%s(R: %s[%s])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		if(PlayerInfo[playerid][pTrial] > 3)
		 {
		   format (string,sizeof ( string ), " * (R)Asistent(3)%s[%s]:%s(R: %s[%s])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		{
		   format (string,sizeof ( string ), "( ! )Jucator:[%s][%s]", GetName(i), text);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
       }
    }
    return 0;
}

 

  • 0
Posted (edited)

Iti arata scrisul la helper 1/2/3 pentru ca tu indeplinesti toate conditiile.In loc de if (..pTrial) > 1.., if (..pTrial) > 2.. pune asa:

If (... pTrial) == 1 ..

Else if(.. pTrial) == 2 ..

Else if (.. pTrial) == 3 ..

 

La faza cu id-ul, id-ul trebuie luat la fel ca numele, nu e suficient sa pui 'playerid'. Iti trebuie ceva in genul "GetPlayerID (playerid)'.

Edited by Alberto.
  • 0
Posted (edited)

A mers.Dar tot mai am o problema.imi apare si ca jucator mesajul...iar la al 2-lea numar unde am incercuit imi apare numele meu si id-ul meu desi ar trebui sa apara ale lui.

http://imgur.com/qeB9Pwr

  	if(IsInChat[playerid] == 1)
	{
    foreach(Player, i)
    {
       if(IsInChat[i] > 0)
       {
       	if(PlayerInfo[playerid][pAdmin] > 1)
		 {
		   format (string,sizeof ( string ), "( ! )Administrator:[%s][%s]", GetName(playerid), text);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		if(PlayerInfo[playerid][pAdmin] > 8)
		 {
		   format (string,sizeof ( string ), " * (R)Administrator(8)%s[%i]:%s(R: %s[%i])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		if(PlayerInfo[playerid][pTrial] == 1)
		 {
		   format (string,sizeof ( string ), " * (R)Asistent(1)%s[%i]:%s(R: %s[%i])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		else if(PlayerInfo[playerid][pTrial] == 2)
		 {
		   format (string,sizeof ( string ), " * (R)Asistent(2)%s[%i]:%s(R: %s[%i])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		else if(PlayerInfo[playerid][pTrial] == 3)
		 {
		   format (string,sizeof ( string ), " * (R)Asistent(3)%s[%i]:%s(R: %s[%i])", GetName(playerid),playerid, text, GetName(i), playerid);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
   		{
		   format (string,sizeof ( string ), "( ! )Jucator:[%s][%s]", GetName(i), text);
		   SendClientMessage(i, 0x6633CCFF, string);
   		}
       }
    }
    return 0;
}

 

Edited by Jimmi
  • 0
Posted

Asta fiindca tu ai pus gresit.

format (string,sizeof ( string ), " * (R)Asistent(3)%s[%i]:%s(R: %s[%i])", GetName(playerid),playerid, text, GetName(i), playerid);

Cod corect.

format (string,sizeof ( string ), " * (R)Asistent(3)%s[%i]:%s(R: %s[%i])", GetName(playerid),playerid, text, GetName(giveplayer), playerid);

 

 

  • 0
Posted

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(45692) : error 035: argument type mismatch (argument 1)


 lini aia

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.