03.11.2017, 23:55
PHP Code:
CMD:setcash(playerid,params[])
{
new id, amount, str[128], pname[MAX_PLAYER_NAME];
if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,-1,"USAGE: /setcash [playerid] [amount]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"That player is ot connected.");
GivePlayerMoney(playerid, amount);
PlayerInfo[playerid][pMoney] = amount;
format(str,sizeof(str), "%s has given you %d$",pname,amount);
SendClientMessage(id,-1,str);
return 1;
}