12.06.2014, 15:10
(
Последний раз редактировалось iFiras; 11.09.2014 в 02:52.
)
Deleted.
public OnPlayerStateChange(playerid, newstate, oldstate)
if(newstate == PLAYER_STATE_DRIVER && pAdmin[playerid] == 0)
{
if((GetTickCount()-GetPVarInt(playerid, "CarTime")) < 1000)
{
SetPVarInt(playerid, "CarWarp", GetPVarInt(playerid, "CarWarp")+1);
if(GetPVarInt(playerid, "CarWarp") >= 5)
{
new pname[24];
new string[128];
GetPlayerName(playerid,pname,24);
format(string,sizeof(string),""COL_RED"%s(%d) has been kicked for car warping hack.",pname,playerid);
SendClientMessageToAll(-1,string);
printf(string);
Ban(playerid);
}
}
SetPVarInt(playerid, "CarTime", GetTickCount());
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SetPVarInt(playerid, "CurrentVehicle", vehicleid);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2 || newstate == 3)
{
if(GetPVarInt(playerid, "CurrentVehicle") != GetPlayerVehicleID(playerid))
{
Kick(playerid);
}
}
return 1;
}