just one 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)
+--- Thread: just one question. (
/showthread.php?tid=362897)
just one question. -
TaLhA XIV - 25.07.2012
Hello,
I just wanted to ask that can I apply commands on others by replacing playerid to targetid,please post a small code for that.I realy want it please.Or just tell me that is is right or not.
Re: just one question. -
Dolby - 25.07.2012
You can use
Strtok or Sscanf.
Re: just one question. -
TaLhA XIV - 25.07.2012
Can't it be done using strcmp?please help of yes.
Re: just one question. -
Dolby - 25.07.2012
Quote:
Originally Posted by TaLhA XIV
Can't it be done using strcmp?please help of yes.
|
You can use Strcmp + strtok or Strcmp + Sscanf,no problems
Re: just one question. -
TaLhA XIV - 26.07.2012
Thanks
Re: just one question. -
maramizo - 26.07.2012
pawn Код:
CMD:hi(targetid,params[])
{
new name[MAX_PLAYER_NAME], string[9+MAX_PLAYER_NAME];
GetPlayerName(targetid, name, MAX_PLAYER_NAME);
format(string, 9+MAX_PLAYER_NAME, "%s says hi.",name);
foreach(Player, i)
{
SendClientMessage(i, COLOR_YELLOW, string);
}
return 1;
}
Re: just one question. -
TaLhA XIV - 26.07.2012
Thanks!