28.08.2009, 14:57
Hello I've a little problem in mine command.
when I type /setallcash 100 oke it will sets all cash to 100$ but It will also display a mesage with: '<Usage> /Setallcash [amount]' but I gived the ammount :S
Код:
if(strcmp(cmd, "/setallcash", true) == 0)
{
if(Girilmis[playerid] == 0) return Mesaj(playerid, COLOR_RED, "<!> You must login first.");
if(Adminlik[playerid] >= 2)
{
for(new i=0; i<GetMaxPlayers(); i++)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return Mesaj(playerid, COLOR_WHITE, "<Usage> /setallcash [amount]");
new Miktar = strval(tmp);
if(Miktar >= 0 && Miktar <= 999999999)
{
format(string, sizeof(string), "<> Administrator %s has changed all player money to $%d.", adminisim, Miktar);
HerkezeMesaj(COLOR_PURPLE, string);
SetPlayerMoney(i, Miktar);
}
else
{
Mesaj(playerid, COLOR_RED, "<!> invalid amount.");
}
}
}
else
{
Mesaj(playerid, COLOR_RED,"<!> You don't have level enough!");
}
return 1;
}

