Check points size
#1

Hi,

Is there left that bug in sa-mp that if you create new check point size is older check point?
Reply
#2

Could you try to explain your point again? I don't understand what your point is?
Reply
#3

I have

http://******************/post/Anti_...include-19846/

But sometimes, players not using cheats get kick... like when suddenly exit car and take checkpoint.
Reply
#4

Код:
public OnPlayerEnterCheckpoint( playerid )
{
	if( IsPlayerInAnyVehicle( playerid ) )
	{
		new 
			Float: Vx, 
			Float: Vy, 
			Float: Vz
		;

		GetVehiclePos( GetPlayerVehicleID( playerid ), Vx, Vy, Vz );
	    if( GetDistance( Vx, Vy, Vz, TampanDanBerani[playerid][0], TampanDanBerani[playerid][1], TampanDanBerani[playerid][2] ) > 20 ) return Kick( playerid );
	}
	else
	{
		if( !IsPlayerInRangeOfPoint( playerid, 10.0, TampanDanBerani[playerid][0], TampanDanBerani[playerid][1], TampanDanBerani[playerid][2] ) ) return Kick( playerid );
	}

	return 1;
}
I have made bold the areas you should increase if you wish to detect players outside the checkpoint area
Reply
#5

I use checkpoint size where is that distance 10.0 and 20.0
Reply
#6

Okay this is how it works.

Код:
TampanDanBerani[playerid][0] // This is the X coordinate. 
TampanDanBerani[playerid][1] // This is the Y coordinate.
TampanDanBerani[playerid][2] // This is the Z coordinate.
These values add up to a single position in the sa-mp world. Now when using radius ( 10.0 and 20.0 are the radius ) it checks if the player is within a certain distance of the x,y and z coordinate.

So if your coordinate are equal to your checkpoint, then the radius is how far from the checkpoint middle point you are. think of it like drawing a circle with the middle of the circle being the X,Y point is.
Reply
#7

I don't understand it's bad i use radius checkpoint size or no?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)