Trolls problem
#1

Hi! Some fu***** are joining on my server and begin to spawn vehicles, get players to them etc. How can I fix it?

I use for anti vehicle spawn it:
Код HTML:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
		new Float: g_ucPos[3];
	    GetVehiclePos(vehicleid, g_ucPos[0], g_ucPos[1], g_ucPos[2]);
	 	if(!IsPlayerInRangeOfPoint(playerid, 100.0, g_ucPos[0], g_ucPos[1], g_ucPos[2]))
	  	{
			if(!IsPlayerInAnyVehicle(playerid))
	 		{   Spcount[playerid]++;
	 		    if(Spcount[playerid] <= 2)return SetVehicleToRespawn(vehicleid);
				else if(Spcount[playerid] == 3) return Kick(playerid);
			}
			return 0;
	    }
	return 1;
}
It seems like it doesn't work because they can spawn vehicles anyway. How can I block troll hacks?
Reply
#2

Not all of them teleport unoccupied vehicles, some get inside of them to update their positions. Check if the vehicle id they are inside matches the previous one, also check if their previous state was PASSENGER and new one is DRIVER. Comparing the vehicle ids should stop them from warping multiple vehicles.
Reply
#3

Use OnPlayerUpdate... Check and save current vehicle / seat info.. Hook your PutPlayerInCar and update it..
check onPlayerentercar and exitcar.. If a player changes car without "onplayerentercar" and you haven't putplayerincar him, he can be striked once.. Moreover, you can check if the entered car is away from him.. If it was away, just remove him from car..
Reply
#4

Quote:
Originally Posted by Mic_H
Посмотреть сообщение
Use OnPlayerUpdate...
You could use OnPlayerStateChange and avoid the massive lag that would be coming from using OnPlayerUpdate...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)