Quote:
Originally Posted by Mugala
with the second code, you'll prevent them to make a teleport from vehicle to vehicle.
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SetPVarInt(playerid,"VehicleID",vehicleid);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == oldstate) return KICK_MESSAGE(playerid,"Cheat");
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if(GetPVarInt(playerid,"VehicleID") != GetPlayerVehicleID(playerid))
{
KICK_MESSAGE(playerid,"Cheat");
return 1;
}
}
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if(GetPVarInt(playerid,"BulletCrash") > gettime() )return KICK_MESSAGE(playerid,"Cleo Mod");
SetPVarInt(playerid,"BulletCrash",gettime() + 1);
}
return 1;
}
|
I'm using same code like this Under OnPlayerStateChange but that crasher maybe using NOP that can disable OnPlayerStateChange
So as i said above maybe code need to move under OnPlayerUpdate
anyway Ty for making codes but On FOOT one is already working perfect , Only issue is with the vehicle one.