30.10.2015, 09:06
PHP код:
CMD:pay(playerid, params[])
{
new id, amount, pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME], string[126];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(id, pName2, sizeof(pName2));
if(sscanf(params, "ud", id, amount))
{
if(Player[playerid][Money] >= amount)
{
Player[playerid][Money] -= amount;
Player[id][Money] += amount;
format(string, sizeof(string), "%s i-a dat lui %s $%d", pName, pName2, amount);
ProxDetector(30, playerid, string, color_purple, color_purple, color_purple, color_purple, color_purple);
}
}
return 1;
}