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



weapons command - NinjaKillS - 14.06.2009

Hey, I was just wondering how would i make a admin command so a admin could give a weapon to any play. Something along the lines of /adgw ID (playerid) ID (weaponid)

Cheers.


Re: weapons command - efeX - 14.06.2009

Wiki.

https://sampwiki.blast.hk/wiki/GivePlayerWeapon
https://sampwiki.blast.hk/wiki/strcmp
https://sampwiki.blast.hk/wiki/IsPlayerAdmin


Re: weapons command - CJ101 - 14.06.2009

Код:
Код:
dcmd_giveweapon(playerid,params[])
{
new Index, tmp[300], tmp2[300];
tmp2 = strtok(params,Index);
tmp = strtok(params,Index);
new wpnid = strval(tmp);
new pid = strval(tmp2);
if(wpnid > 38) return SendClientMessage(playerid,0xE60000FF,"Invalid Weapon...");
GivePlayerWeapon(pid,wpnid,1000);
new string[256], wname[90];
GetWeaponName(wpnid,wname,90);
format(string, sizeof(string), "You Recieved a %s",wname);
SendClientMessage(pid,0xE60000FF,string);
return 1;
}
just wrote it for ya ;)



Re: weapons command - NinjaKillS - 14.06.2009

Thanks guys

And wow the codes look ahell of alot harder their, Im still on like noob newbi scripter, Lol.