weapons command
#1

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.
Reply
#2

Wiki.

https://sampwiki.blast.hk/wiki/GivePlayerWeapon
https://sampwiki.blast.hk/wiki/strcmp
https://sampwiki.blast.hk/wiki/IsPlayerAdmin
Reply
#3

Код:
Код:
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 ;)
Reply
#4

Thanks guys

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


Forum Jump:


Users browsing this thread: 1 Guest(s)