21.08.2012, 09:08
I making RolePlay mod from scratch,and all i did #include zcmd....zcmd commands working without parametres,but when i making admin commands with [id] eg /akill [id]....I do everything right, but when I enter any id say / akill 1,2,3,4,5,6,7,8,9 etc. .. always kills me, here is my command. here is my code..
Код:
CMD:akill(playerid, params[]) { new id; if (sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_CRIMSON, "Koristi: /akill [id]"); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_CRIMSON, "Greska igrac nije konektovan!"); else { SetPlayerHealth(id, 0); SendClientMessage(id, COLOR_CRIMSON, "Ubijen si od strane admina!"); SendClientMessage(playerid, COLOR_CRIMSON, "Igrac ubijen!"); } return 1; }