Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd(plac, playerid, params[])
- {
- new id, amount, str[126];
- if(sscanf(params, "ud", id, amount)) return SPD(playerid, GUI_NOT_RESPONSE, DIALOG_STYLE_MSGBOX, "Urban RolePlay >> Błąd", "/plac [ID/Nick] [ilość]", "Rozumiem", "");
- if(id == INVALID_PLAYER_ID) return SCM(playerid, SZARY, "Nie ma takiego gracza!");
- if(amount >= PlayerData[playerid][pMoney]) return SendClientMessage(playerid, SZARY, "Nie posiadasz tyle gotówki");
- if(!IsPlayerNearPlayer(playerid, id, 5.0)) return SendClientMessage(playerid, SZARY, "Gracz nie znajduje się w pobliżu.");
- PlayerData[id][pMoney] += amount;
- format(str, sizeof str, "Otrzymałeś %i pieniędzy od %s", amount, PlayerData[playerid][pNick]);
- SCM(id, COLOR_LIGHTBLUE, str);
- PlayerData[playerid][pMoney] -= amount;
- format(str, sizeof str, "Dałeś %i pieniędzy dla %s", amount, PlayerData[id][pNick]);
- SCM(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof str, "Gracz %s wyciąga trochę pieniędzy z portfela po czym przekazuje je %s", PlayerData[playerid][pNick], PlayerData[id][pNick]);
- SCME(14.0, playerid, str, COLOR_PURPLE);
- ZapiszGracza(playerid);
- ZapiszGracza(id);
- return 1;
- }
Add Comment
Please, Sign In to add comment