13.07.2012, 12:05
okay okay i started use zcmd and sscanf and givemoney problem sloved
now another problem with zcmd and sscanf look in it
its okay no compile errors just when i enter server i do /akill 0 blabla"
its send me message "usage : /akill plaerid reason
and if i do "akill 0 0"
its send me message "admin killed u reason : 0"
only if akill 0 0
its working why?
now another problem with zcmd and sscanf look in it
Quote:
new reason; COMMAND:akill(playerid, params[]) { if (IsPlayerAdmin(playerid)) { new toplayerid, //the player we want to give money to amount; //extracting player's id and amount from params if (!sscanf(params, "ii", toplayerid, reason)) { if (toplayerid != INVALID_PLAYER_ID) { new message[40]; SetPlayerHealth(playerid, 0); format(message, sizeof(message), "admin killed u reason : %d", amount); SendClientMessage(toplayerid, 0x00FF00FF, message); } else SendClientMessage(playerid, 0xFF0000FF, "that player is not connected"); } else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /akill <plaerid> <reason>"); } else SendClientMessage(playerid, 0xFF0000FF, "only admins can use this command!"); return 1; } |
its send me message "usage : /akill plaerid reason
and if i do "akill 0 0"
its send me message "admin killed u reason : 0"
only if akill 0 0
its working why?