Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Fillup()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new VID;
- new FillUp;
- new string[256];
- VID = GetPlayerVehicleID(i);
- FillUp = GetGasMax(GetVehicleModel(VID)) - Gas[VID];
- if(Refueling[i] == 1)
- {
- if(GetPlayerMoney(i) >= FillUp+1)
- {
- Gas[VID] += FillUp;
- FillUp = SBizzInfo[2][sbEntranceCost] * FillUp;
- format(string,sizeof(string),"* Fahrzeug für $%d aufgetankt. (Preis pro Liter: $%d)",FillUp,SBizzInfo[2][sbEntranceCost]);
- SendClientMessage(i,COLOR_LIGHTBLUE,string);
- GivePlayerMoney(i, - FillUp);
- SBizzInfo[2][sbTill] += FillUp/1;
- ExtortionSBiz(2, FillUp);
- Refueling[i] = 0;
- UnFreezePlayer(i);
- }
- else
- {
- format(string,sizeof(string),"* Du hast nicht genug Geld zum Tanken, Kosten: $%d / Liter.",FillUp);
- SendClientMessage(i,COLOR_LIGHTBLUE,string);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement