Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. Function Fillup()
  2. {
  3. for(new i=0; i<MAX_PLAYERS; i++)
  4. {
  5. if(IsPlayerConnected(i))
  6. {
  7. new VID;
  8. new FillUp;
  9. new string[256];
  10. VID = GetPlayerVehicleID(i);
  11. FillUp = GetGasMax(GetVehicleModel(VID)) - Gas[VID];
  12. if(Refueling[i] == 1)
  13. {
  14. if(GetPlayerMoney(i) >= FillUp+1)
  15. {
  16. Gas[VID] += FillUp;
  17. FillUp = SBizzInfo[2][sbEntranceCost] * FillUp;
  18. format(string,sizeof(string),"* Fahrzeug für $%d aufgetankt. (Preis pro Liter: $%d)",FillUp,SBizzInfo[2][sbEntranceCost]);
  19. SendClientMessage(i,COLOR_LIGHTBLUE,string);
  20. GivePlayerMoney(i, - FillUp);
  21. SBizzInfo[2][sbTill] += FillUp/1;
  22. ExtortionSBiz(2, FillUp);
  23. Refueling[i] = 0;
  24. UnFreezePlayer(i);
  25. }
  26. else
  27. {
  28. format(string,sizeof(string),"* Du hast nicht genug Geld zum Tanken, Kosten: $%d / Liter.",FillUp);
  29. SendClientMessage(i,COLOR_LIGHTBLUE,string);
  30. }
  31. }
  32. }
  33. }
  34. return 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement