commands not works :(
#12

okay okay i started use zcmd and sscanf and givemoney problem sloved
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 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?
Reply


Messages In This Thread
sscanf and zcmd (akill command) [REP ++] - by SamiHam - 12.07.2012, 14:47
Re: commands not works :( - by UnknownGamer - 12.07.2012, 15:49
Re: commands not works :( - by SamiHam - 12.07.2012, 16:00
Re: commands not works :( - by SamiHam - 13.07.2012, 06:43
Re: commands not works :( - by Kaperstone - 13.07.2012, 07:41
Re: commands not works :( - by SamiHam - 13.07.2012, 08:25
Re: commands not works :( - by Pro_Scriptor - 13.07.2012, 09:00
Re: commands not works :( - by clarencecuzz - 13.07.2012, 09:55
Re: commands not works :( - by SamiHam - 13.07.2012, 09:58
Re: commands not works :( - by Devilxz97 - 13.07.2012, 11:21
Re: commands not works :( - by Devilxz97 - 13.07.2012, 11:59
Re: commands not works :( - by SamiHam - 13.07.2012, 12:05
Re: commands not works :( - by Devilxz97 - 13.07.2012, 12:16
Re: commands not works :( - by Devilxz97 - 13.07.2012, 12:39
Re: commands not works :( - by SamiHam - 13.07.2012, 12:52
Re: commands not works :( - by Devilxz97 - 13.07.2012, 12:58
Re: commands not works :( - by SamiHam - 13.07.2012, 13:01
Re: commands not works :( - by Devilxz97 - 13.07.2012, 13:12
Re: commands not works :( - by Devilxz97 - 13.07.2012, 13:58
Re: commands not works :( - by Andi_Evandy - 13.07.2012, 14:06

Forum Jump:


Users browsing this thread: 1 Guest(s)