Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  2. {
  3.     GetVehiclePos(vehicleid, new_x, new_y, new_z);
  4.     if(!IsPlayerInRangeOfPoint(playerid, 20, new_x, new_y, new_z)) return 0;
  5.     if(passenger_seat)
  6.     {
  7.         new Float:x, Float:y, Float:z;
  8.         GetVehiclePos(vehicleid,x,y,z);
  9.         if(GetFloatDifference(x,gVehicles[vehicleid][vX]) > 20.0 || GetFloatDifference(y,gVehicles[vehicleid][vY]) > 20.0)
  10.         {
  11.             gVehicles[vehicleid][vX] = x;
  12.             gVehicles[vehicleid][vY] = y;
  13.             gVehicles[vehicleid][vZ] = z;
  14.             SetPVarInt(playerid,"pKick4", GetPVarInt(playerid,"pKick4") + 1);
  15.             if(GetPVarInt(playerid,"pKick4") == 4 && PlayerInfo[playerid][pAdmin] < 4)
  16.             {
  17.                 SendClientMessage(playerid, COLOR_LIGHTRED, "Вы кикнуты по подозрению в читерстве (carshot)");
  18.                 GKick(playerid, 1048);
  19.             }
  20.         }
  21.     }
  22.     return 1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement