Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/retireratm", true) == 0 || strcmp(cmd, "/ratm", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retireratm [montant]");
- format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- new cashdeposit = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retireratm [montant]");
- format(string, sizeof(string), " Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Vous n'avez pas cette somme sur votre compte bancaire!");
- return 1;
- }
- /*if (PlayerInfo[playerid][pJobTimer] > 0)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Attendez que votre transaction précédente se termine!");
- return 1;
- }*/
- if (cashdeposit > 1000)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Vous ne pouvez pas retirer plus de $1.000!");
- return 1;
- }
- ConsumingMoney[playerid] = 1;
- SafeGivePlayerMoney(playerid,cashdeposit);
- PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
- format(string, sizeof(string), "Vous avez retiré $%d de votre compte. Il vous reste: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- //PlayerInfo[playerid][pJobTimer] = 12;
- GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), " ID(%d) -%s a retiré %d de son compte bancaire.", playerid,giveplayer,cashdeposit);
- ABroadCast(COLOR_YELLOW,string,1);
- PayLog(string);
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment