13.01.2015, 10:33
Why this anti g abuse makes the player don't enter the car if it has a driver, and when there are more than 1 player, and when someone attempt to g abuse (without a driver), the server freezes as hell.
under onplayerstatechange:
PLEASE HELP
under onplayerstatechange:
pawn Код:
if(GetPlayerVehicleSeat(playerid) > 0 && GetPlayerVehicleSeat(playerid) < 4)
{
foreach(Player, i)
{
i =! playerid;
new msglimit[MAX_PLAYERS];
if(!IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)) || IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)) && GetPlayerVehicleSeat(i) != 0)
{
msglimit[playerid] = 1;
if(msglimit[playerid] == 1)
{
SendClientMessage(playerid, 0xFF0000AA, "Anti-Cheat (AC): Please Don't G Abuse!");
GameTextForPlayer(playerid, "~r~Don't G Abuse!", 3000, 3);
}
RemovePlayerFromVehicle(playerid);
msglimit[playerid] = 0;
}
}
}