Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 3: //Игрок в машине, на месте пассажира - (можно писать PLAYER_STATE_PASSENGER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- foreach(new i: Player)
- {
- if(PlayerLogged[i] == false) continue;
- if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2)
- {
- new string[32];
- if(GetPVarInt(i, "PriceTaxi") > 0)
- {
- if(GetMoney(playerid) < GetPVarInt(i, "PriceTaxi"))
- {
- SendClientMessage(playerid, COLOR_GREY, ""cER"У вас не хватает денег!");
- RemoveFromVehicle(playerid);
- }
- else
- {
- TransferMoney(playerid, -1, GetPVarInt(i, "PriceTaxi"));
- PI[i][pPayCheck] += GetPVarInt(i, "PriceTaxi");
- SetPVarInt(playerid, "TimeTaxi", 30);
- SetPVarInt(playerid, "TaxiPrice",GetPVarInt(i, "PriceTaxi"));
- SetPVarInt(playerid, "PlayerTaxi", i);
- format(string, sizeof(string), "~r~-%iр", GetPVarInt(i, "PriceTaxi"));
- GameTextForPlayer(playerid, string, 5000, 1);
- format(string, sizeof(string), "~b~+%iр", GetPVarInt(i, "PriceTaxi"));
- GameTextForPlayer(i, string, 5000, 1);
- SetPVarInt(i, "TaxiMoney", GetPVarInt(i, "TaxiMoney") + GetPVarInt(i, "PriceTaxi"));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement