/giveweapon command
#1

I need help with this command

I want that if a admin types /giveweapon that he can gives a weapon to a random player.
and also I want as USAGE "USAGE:/Giveweapon [ID] [IDofWeapon] [AMOUNT]"
Just take my code and improve it
Quote:

CMD:giveweapon(playerid, params[])
{
if (!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, -1, "SERVER: Unknown command.");
}
else if (IsPlayerAdmin(playerid))
{
GivePlayerWeapon(playerid, weaponid, 6000);
}
if (!IsPlayerLoggedIn(playerb))
{
SendClientMessage(playerid, COLOR_WARN, "Invalid player id");
}
if (weapon < 4 || weapon > 41)
{
SendClientMessage(playerid, COLOR_WARN, "Weapons are between id 4 and 41");
}
return 1;
}

Reply


Messages In This Thread
/giveweapon command - by saffierr - 16.07.2014, 02:00
Re: /giveweapon command - by BlackSirrah239 - 16.07.2014, 02:13
Re: /giveweapon command - by saffierr - 16.07.2014, 02:29
Re: /giveweapon command - by amirab - 16.07.2014, 02:54

Forum Jump:


Users browsing this thread: 3 Guest(s)