16.07.2014, 02:00
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
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; } |