?? Do something to others command ?? - 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: ?? Do something to others command ?? (
/showthread.php?tid=396550)
?? Do something to others command ?? -
NicholasA - 01.12.2012
Hi i was just wondering how do i make a command like:
/givemp5 [ID]
Like a command where you could asign a playerid to and it'll do the command to the player?
Thanks!
Re: ?? Do something to others command ?? -
[MM]RoXoR[FS] - 01.12.2012
You will need ZCMD and sscanf. There are TONS of tutorials to do this.
A simple command example
pawn Код:
CMD:givemp5(playerid,params[])//givemp5 is your command name
{
new targetid;//The id to which you want to give weapon
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"Usage : /givemp5 [ID]");//if he typed wrong
GivePlayerWeapon(targetid,WEAPON_MP5,1000);
return 1;
}