Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. public OnPlayerStateChange(playerid, newstate, oldstate)
  2. {
  3. if(!ac_1{playerid} && newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_NONE) return SKick(playerid, 5341);
  4. Air_Gettime(playerid,4);
  5. if(PI[playerid][pAdmin] == ADM_NONE)
  6. {
  7. if(newstate == PLAYER_STATE_DRIVER) PlayerEnterTime[playerid] = GetTickCount();
  8. else if(oldstate == PLAYER_STATE_DRIVER)
  9. {
  10. if((GetTickCount()-PlayerEnterTime[playerid]) < 220)
  11. {
  12. new string[128];
  13. SendLog("CheatLog",string);
  14. return 0;
  15. }
  16. }
  17. }
  18. if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_PASSENGER || oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_DRIVER) CheatKick(playerid, 2918); // краш машинами
  19. if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_DRIVER)
  20. {
  21. if(GetPVarInt(playerid, "CarHackUsing") > 2) CheatKick(playerid, 1957);
  22. SetPVarInt(playerid, "CarHackUsing", GetPVarInt(playerid, "CarHackUsing")+1);
  23. }
  24. if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  25. {
  26. new carid = GetPlayerVehicleID(playerid), Float:X, Float:Y, Float:Z;
  27. GetVehiclePos(carid, X, Y, Z);
  28. VehiclePos[carid][0] = X;
  29. VehiclePos[carid][1] = Y;
  30. VehiclePos[carid][2] = Z;
  31. }
  32. if(newstate == PLAYER_STATE_DRIVER)
  33. {
  34. new model = GetPlayerVehicleSeat(playerid);
  35. if(model != 128)
  36. {
  37. if(!model)
  38. {
  39. model = GetVehicleModel(GetPlayerVehicleID(playerid));
  40. if(!(400 <= model <= 611) || MaxPassengers[model - 400 >>> 3] >>> ((model - 400 & 7) << 2) & 0xF == 15) return CheatKick(playerid, 12);
  41. }
  42. else return CheatKick(playerid, 62);
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement