/putgun /takegun
#5

Код:
if(strcmp(cmd, "/giveweapon", true) == 0)
	{
	if(IsPlayerAdmin(playerid))
    {
    new var1, var2;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4444FF, "[ERROR] Usage: /giveweapon [id] [WeaponID]");
    var1 = strval(tmp);

    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4444FF, "[ERROR] Usage: /giveweapon [id] [WeaponID]");
    var2 = strval(tmp);
    GivePlayerWeapon(var1,var2,2000);

    }
    else
    {
    SendClientMessage(playerid,0xFF4444FF,"* You can not use this command");
    }
    return 1;
    }
This gives a given ID a weapon.
  • var1 = The player ID
  • var2 = The weapon ID
  • The ammo = 2000

It checks if you are Rcon Admin.
And when you mean with "takegun" resetting the weapons of a player then just change the command above a bit and you are done.


Quote:

no i will put gun in interior and then take it are you understand ? wie puting gun in car you have 6 slots to put and then the gun save in car then on reconnect draw gun.
ok give me zcmd

Ouch I should start reading topics a bit more carefuly.
Reply


Messages In This Thread
/putgun /takegun - by Dino Bloomer - 12.04.2011, 12:49
Re: /putgun /takegun - by Seven_of_Nine - 12.04.2011, 13:21
Re: /putgun /takegun - by Dino Bloomer - 12.04.2011, 18:04
Re: /putgun /takegun - by Dino Bloomer - 12.04.2011, 19:08
AW: /putgun /takegun - by Gomma - 12.04.2011, 19:24
Re: /putgun /takegun - by Dino Bloomer - 13.04.2011, 12:58
Re: /putgun /takegun - by Dino Bloomer - 15.04.2011, 11:13
Re: /putgun /takegun - by sabreman - 15.04.2011, 12:26
Re: /putgun /takegun - by Seven_of_Nine - 15.04.2011, 12:41
Re: /putgun /takegun - by Miller - 15.04.2011, 13:02

Forum Jump:


Users browsing this thread: 2 Guest(s)