22.08.2016, 11:56
Код:
COMMAND:giveweapon(playerid, params) { new id,weaponid, ammo, msg[128], name1[MAX_PLAYER_NAME]; if(sscanf(params,"uii", id, weaponid, ammo)) return SCM(PID, -1, "Usage: /giveweapon [ID] [WeaponId] [Ammo]"); if(PlayerInfo[playerid][pAdmin] < 4) return SCM(PID, COLOR_RED, "You must be level 4 admin!"); if(PlayerInfo[playerid][pAdmin] == 0) return SCM(PID, COLOR_RED,"You are not allowed to use this command!"); if(id == INVALID_PLAYER_ID) return SCM(PID, COLOR_RED, "That Player is not connected"); { GivePlayerWeapon(id, weaponid, ammo); GPN(PID, name1, sizeof(name1)); format(msg, sizeof(msg),"Admin %s gave you gun! ammo: %d", name1, ammo); SCM(id, COLOR_YELLOW, msg); } return 1; }