Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(!ac_1{playerid} && newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_NONE) return SKick(playerid, 5341);
- Air_Gettime(playerid,4);
- if(PI[playerid][pAdmin] == ADM_NONE)
- {
- if(newstate == PLAYER_STATE_DRIVER) PlayerEnterTime[playerid] = GetTickCount();
- else if(oldstate == PLAYER_STATE_DRIVER)
- {
- if((GetTickCount()-PlayerEnterTime[playerid]) < 220)
- {
- new string[128];
- SendLog("CheatLog",string);
- return 0;
- }
- }
- }
- if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_PASSENGER || oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_DRIVER) CheatKick(playerid, 2918); // краш машинами
- if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_DRIVER)
- {
- if(GetPVarInt(playerid, "CarHackUsing") > 2) CheatKick(playerid, 1957);
- SetPVarInt(playerid, "CarHackUsing", GetPVarInt(playerid, "CarHackUsing")+1);
- }
- if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- new carid = GetPlayerVehicleID(playerid), Float:X, Float:Y, Float:Z;
- GetVehiclePos(carid, X, Y, Z);
- VehiclePos[carid][0] = X;
- VehiclePos[carid][1] = Y;
- VehiclePos[carid][2] = Z;
- }
- if(newstate == PLAYER_STATE_DRIVER)
- {
- new model = GetPlayerVehicleSeat(playerid);
- if(model != 128)
- {
- if(!model)
- {
- model = GetVehicleModel(GetPlayerVehicleID(playerid));
- if(!(400 <= model <= 611) || MaxPassengers[model - 400 >>> 3] >>> ((model - 400 & 7) << 2) & 0xF == 15) return CheatKick(playerid, 12);
- }
- else return CheatKick(playerid, 62);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement