SA-MP Forums Archive
affecting other players - 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: affecting other players (/showthread.php?tid=145590)



affecting other players - luigifan9 - 02.05.2010

how can i make if someone does /whatever playerid how can i make it affect the playerid they put?


Re: affecting other players - Antonio [G-RP] - 02.05.2010

Код:
if(strcmp(cmd, "/COMMAND HERE", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "Use /COMMAND HERE [playerid]");
return 1;
}
if(IsStringAName(tmp))
{
giveplayerid = GetPlayerID(tmp);
}
else
{
giveplayerid = strval(tmp);
}