SA-MP Forums Archive
Vehicle zone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle zone (/showthread.php?tid=559360)



Vehicle zone - bigboy81 - 22.01.2015

I making system if vehicle enter in some zone server detect vechicleid and destroy it..
But if player in vehicle and if in zone server spam him message Please leave this place
i dont know why??

Код:
new carid = GetPlayerVehicleID(playerid);
	for(new i; i < MAX_PLAYERS; i++)
 	{
    	if(IsPlayerInRangeOfPoint(i, 4.0, 1296.2551,-1863.5883,14.5189))
     	{
      		if(IsPlayerInVehicle(playerid,carid))
        	{
         		SCM(playerid, COLOR_RED,"{EA0C0C}Please leave this place !");
   		}
   		return 1;
   	}



Re: Vehicle zone - Riso135 - 22.01.2015

If you want what you wrote, do this:

Код:
new carid = GetPlayerVehicleID(playerid);
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1296.2551,-1863.5883,14.5189))
{
if(IsPlayerInVehicle(playerid,carid))
{
RemovePlayerFromVehicle(playerid);
DestroyVehicle(carid);
}



Re: Vehicle zone - bigboy81 - 22.01.2015

I want that with text,but text spam in my code..


Re: Vehicle zone - Riso135 - 22.01.2015

Than do it for example via textdraw or gametext, it spams SendClientMessage because the server is still checking if the player is in radius of that coordinates


Re: Vehicle zone - bigboy81 - 22.01.2015

I know server use sendclientmessage but doesn't spawm..
Where to put that text and fix spamm?


Re: Vehicle zone - Sawalha - 22.01.2015

try to add
pawn Код:
break;
inside the loop so it can prevent it from continuing


Re: Vehicle zone - bigboy81 - 22.01.2015

not work


Re: Vehicle zone - bigboy81 - 23.01.2015

FIRST BUMP !


Re: Vehicle zone - bigboy81 - 23.01.2015

BUMP TWO !


Re: Vehicle zone - bigboy81 - 23.01.2015

Anybody