Creat /givegun command(zcmd)
#1

hi , i want to creat /givegun command to give a gun to a player Near Me ... how to do it?
Reply
#2

PHP код:
CMD:givegun(playerid, params[])
{
    new 
id, gun, ammo;
    if(
sscanf(params,"uii", id, gun, ammo)) return SendClientMessage(playerid, -1,"USAGE: /givegun [playerid/partofname] [gunid] [ammo]");
    if(
gun > 47 || gun < 1) return SendClientMessage(playerid, -1,"GUN ID'S: 1-47");
    if(
ammo > 999 || ammo < 1) return SendClientMessage(playerid, -1,"Ammo 1-999");
     
GivePlayerWeapon(id, gun, ammo);
    return 
1;
} 
Reply
#3

Thank you but i want for an exaple i have M4 i want to give it to other Player near me not spawning to him a Gun(but i copy your Code to use it Later)
Reply
#4

You mean, you want to give him your gun?
Reply
#5

yea System64 and the player must be near me
Reply
#6

any Idea?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)