SA-MP Forums Archive
player id - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: player id (/showthread.php?tid=416812)



player id - DarkB0y - 18.02.2013

Well i have try many way but it gave me the same thing when i want to chat it gave me 2
this is all my OnPlayerText
pawn Код:
public OnPlayerText(playerid, text[])
{
    switch(xTestBusy)
    {
        case true:
        {
            if(!strcmp(xChars, text, false))
            {
                new
                    string[128],
                    pName[MAX_PLAYER_NAME]
                ;
                GetPlayerName(playerid, pName, sizeof(pName));
                format(string, sizeof(string), "{FF5500}\%s\" {C3C3C3}has won the reaction test.", pName);
                SendClientMessageToAll(GREEN, string);
                format(string, sizeof(string), "{C3C3C3}You have earned $%d + %d score points.", xCash, xScore);
                SendClientMessage(playerid, GREEN, string);
                GivePlayerMoney(playerid, xCash);
                SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
                xReactionTimer = SetTimer("xReactionTest", TIME, 1);
                xTestBusy = false;
            }
     }
    }
    new s[150];
    format(s,sizeof(s),"%s {B6CBD6}[%d]: {FFFFFF}%s", GetName(playerid), playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), s);
    return 1;
}



Re: player id - Babul - 18.02.2013

try
Код:
	SendClientMessageToAll(GetPlayerColor(playerid), s);
	return 0;