Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. case 3: //Игрок в машине, на месте пассажира - (можно писать PLAYER_STATE_PASSENGER)
  2. {
  3. new vehicleid = GetPlayerVehicleID(playerid);
  4. foreach(new i: Player)
  5. {
  6. if(PlayerLogged[i] == false) continue;
  7. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2)
  8. {
  9. new string[32];
  10. if(GetPVarInt(i, "PriceTaxi") > 0)
  11. {
  12. if(GetMoney(playerid) < GetPVarInt(i, "PriceTaxi"))
  13. {
  14. SendClientMessage(playerid, COLOR_GREY, ""cER"У вас не хватает денег!");
  15. RemoveFromVehicle(playerid);
  16. }
  17. else
  18. {
  19. TransferMoney(playerid, -1, GetPVarInt(i, "PriceTaxi"));
  20. PI[i][pPayCheck] += GetPVarInt(i, "PriceTaxi");
  21. SetPVarInt(playerid, "TimeTaxi", 30);
  22. SetPVarInt(playerid, "TaxiPrice",GetPVarInt(i, "PriceTaxi"));
  23. SetPVarInt(playerid, "PlayerTaxi", i);
  24. format(string, sizeof(string), "~r~-%iр", GetPVarInt(i, "PriceTaxi"));
  25. GameTextForPlayer(playerid, string, 5000, 1);
  26. format(string, sizeof(string), "~b~+%iр", GetPVarInt(i, "PriceTaxi"));
  27. GameTextForPlayer(i, string, 5000, 1);
  28. SetPVarInt(i, "TaxiMoney", GetPVarInt(i, "TaxiMoney") + GetPVarInt(i, "PriceTaxi"));
  29. }
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement