SA-MP Forums Archive
question - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: question (/showthread.php?tid=115628)



question - [WF]Demon - 25.12.2009

Hello i was wondering if this command would work i made it on my comp without samp installed so idk its supposed to check the person who types in the command in their ping its a silly cmd but i need someone to test it here it is :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/ping", cmdtext, true, 10) == 0)
    {
GetPlayerPing(playerid);

SendClientMessage(playerid, 0, "Your Ping Is %d");
}
    return true;
 }
help me and if this dosent work send back a working one please!!!
thanks! Crodox RP A.K.A Cody Beer



Re: question - Dark_Kostas - 25.12.2009

pawn Код:
if (strcmp("/ping", cmdtext, true, 10) == 0)
{
    new string[20];
    format(string, sizeof(string), "Your Ping Is %d", GetPlayerPing(playerid));
    SendClientMessage(playerid, YOUR_COLOR_NAME, string);
    return true;
}