15.01.2017, 02:21
Why this command not giving players money?
sorry for bad code. im newbie. seomeone fix the code for me please.
sorry for bad code. im newbie. seomeone fix the code for me please.
Код:
if(strcmp(cmd, "/giveallmoney", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 8)
{
tmp = strtok(cmdtext, idx);
new amount = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /giveallmoney [amount]");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
GivePlayerMoney(i, amount);
format(string, sizeof(string), "~y~+$~w~%d",amount);
GameTextForAll(string, 5000, 1);
format(string, sizeof(string), "• %s Has given $%d to all players •",sendername,amount);
SendClientMessageToAll(YELLOW,string);
}
}
}
return 1;
}


