14.02.2012, 13:11
Hello guys. I made a /setmoney for my GameMode, and it worked same way in other modes/scripts, but now when i type it IG(/setmoney 0 5000), it says: You gave 5000 to .
And i don't get any money...
Same happening to /makeadmin that worked before.
Code:
And i don't get any money...
Same happening to /makeadmin that worked before.
Code:
pawn Код:
COMMAND:setmoney(playerid, params[])
{
new id;
new ammount;
if(IsPlayerConnected(id))
{
if(PlayerInfo[playerid][AdminLevel] >= 3)
{
if(!sscanf(params, "ui", id, ammount))
{
if(ammount <= 10000000000)
{
new string[64]; new Name[MAX_PLAYER_NAME]; new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s Has Given You %d.", Name, ammount);
SendClientMessage(id, COLOR_DARKGOLD, string);
format(string, sizeof(string), "You Gave %d Money To %s .", ammount, PlayerName);
SendClientMessage(playerid, COLOR_DARKGOLD, string);
SetPlayerMoney(id, ammount);
return 1;
}
else return SendClientMessage(playerid, COLOR_DARKGOLD, "You can't give so much");
}
else return SendClientMessage(playerid, COLOR_DARKGOLD, "USAGE: /setmoney [PlayerId/PartOfName] [Ammount]");
}
else return NotAdmin(playerid);
}
else return SendClientMessage(playerid, COLOR_DARKGOLD, "Player is not connected.");
}