GetPlayerName(TicketOffer[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Vocк pagou o ticket de $%d para o oficial %s.", TicketMoney[playerid], giveplayer);
SendClientMessage(playerid, Branco, string);
format(string, sizeof(string), "* %s pagou o ticket de $%d.", sendername, TicketMoney[playerid]);
SendClientMessage(TicketOffer[playerid], Branco, string);
//Info[playerid][Conta]-TicketMoney[playerid];
SafeGivePlayerMoney(playerid, - TicketMoney[playerid]);
SafeGivePlayerMoney(TicketOffer[playerid], TicketMoney[playerid]);
TicketOffer[playerid] = 999;
TicketMoney[playerid] = 0;
dini_Int(file,"Conta");
dini_IntSet(file, "Conta",Info[playerid][Conta]-TicketMoney[playerid]);
Talvez, em vez disso de Info...
pawn Код:
|
GetPlayerName(TicketOffer[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Vocк pagou o ticket de $%d para o oficial %s.", TicketMoney[playerid], giveplayer);
SendClientMessage(playerid, Branco, string);
format(string, sizeof(string), "* %s pagou o ticket de $%d.", sendername, TicketMoney[playerid]);
SendClientMessage(TicketOffer[playerid], Branco, string);
new DinheiroConta = Info[playerid][Conta]; //Variavel
new DinheiroTicket = TicketMoney[playerid]; //Variavel
new DinheiroFinal = DinheiroConta - DinheiroTicket; //Ligaзгo entre as variбveis
SafeGivePlayerMoney(playerid, DinheiroFinal);//Vai Retirar o Dinheiro Final =D
SafeGivePlayerMoney(TicketOffer[playerid], TicketMoney[playerid]);
TicketOffer[playerid] = 999;
TicketMoney[playerid] = 0;