29.10.2015, 21:03
PHP код:
CMD:pay(playerid, params[])
{
new id, amount, pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME], string[126];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(playerid, 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;
}