SA-MP Forums Archive
The Pawno Question?:o - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: The Pawno Question?:o (/showthread.php?tid=71521)



The Pawno Question?:o - XeoN_13 - 01.04.2009

hello, and before i start sorry for my misspelled english or bad english. , im posting this because i need a little bit of help on doing a code for my gamemode . a IsPlayerInArea with this cords -385.3699, 1448.057, 665.6389, 2685.911

what i whant to make is simple but still need help, i whant the code to make the player teleport to another place once they hit the area -385.3699, 1448.057, 665.6389, 2685.911 , once they hit the area they will get teleported with vehicle back to another area example ...

: player has a hydra and gets out of this area
Код:
-385.3699, 1448.057, 665.6389, 2685.911
, he will get teleported back to this set of cords
Код:
389.8672,2543.0046,16.5391
... if any one could help me i would apreciate it


Re: The Pawno Question?:o - FUNExtreme - 01.04.2009

Is there a part that you allready know or do you need everything?


Re: The Pawno Question?:o - XeoN_13 - 01.04.2009

well right now i have this

Код:
	public OnPlayerStateChange(playerid, newstate, oldstate)
	{

	if( newstate == PLAYER_STATE_DRIVER )
	{
		if( GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 425 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 432 )
		{
	      SendClientMessage(playerid, COLOR_LIGREEN, "<!> AS ENTRADO A UN VEHICULO DE GUERRA! NO PODRAS SALIR DE ESTA ZONA CON ESTE COCHE");
	     	SendClientMessage(playerid, COLOR_LIGREEN, "PARA PODER SALIR DE ZONA DE GUERRA SAL DEL VEHICULO DE I BUSCA OTRO COCHE QUE NO SEA DE ESTOS");
				SetPlayerWorldBounds(playerid, 677.3168, -478.7929, 2849.402, 1494.768);

		}
	}


	if( oldstate == PLAYER_STATE_DRIVER )
	{
	      SetPlayerWorldBounds(playerid, 3500.0000,-3500.0000,3500.0000,-3500.0000);

	}

	return 1;
	}
but theres times when a cheater comes in he teleports and uses cheats so the WorldBounds , Dont bring him back so i whant to make it so it just teleports back every time he croses the area .. u get it?

example: a c heater uses gravity or w/e it is "cheats" so the worldbounds dont let him go. i whant it so every time he users his "cheats" to try to get out of the area he eather gets killed or gets teleported back to a set of cords


Re: The Pawno Question?:o - FUNExtreme - 01.04.2009

Go to the wiki and find info about IsPlayerInArea. Follow the example, when you are done we will add the teleporting back!


Re: The Pawno Question?:o - XeoN_13 - 01.04.2009

sorry but im not good at pawno , would this work?

Код:
	public OnPlayerStateChange(playerid, newstate, oldstate)
	{

	if( newstate == PLAYER_STATE_DRIVER )
	{
        isPlayerInArea(CordS HERE);

		if( GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 425 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 432 )
		{

             
				SetPlayerWorldBounds(playerid, 677.3168, -478.7929, 2849.402, 1494.768);
                 SetPlayerPoss( etc..._
                

		}
	}


	if( oldstate == PLAYER_STATE_DRIVER )
	{
	      SetPlayerWorldBounds(playerid, 3500.0000,-3500.0000,3500.0000,-3500.0000);

	}

	return 1;
	}



Re: The Pawno Question?:o - Think - 01.04.2009

would only teleport him out of the hydra everytime he steps in


Re: The Pawno Question?:o - XeoN_13 - 01.04.2009

Quote:
Originally Posted by Pandabeer1337
would only teleport him out of the hydra everytime he steps in
but how do i do this?


Re: The Pawno Question?:o - FUNExtreme - 01.04.2009

No your thing wont work.

Quote:
Originally Posted by FUNExtreme
Go to the wiki and find info about IsPlayerInArea. Follow the example, when you are done we will add the teleporting back!



Re: The Pawno Question?:o - Think - 01.04.2009

Quote:
Originally Posted by FUNExtreme
No it wont.

Quote:
Originally Posted by FUNExtreme
Go to the wiki and find info about IsPlayerInArea. Follow the example, when you are done we will add the teleporting back!
yes it would, if your not in that area >.>


Re: The Pawno Question?:o - FUNExtreme - 01.04.2009

No it wont, he sets the pos everytime that they enter a hydra. And he diddent search for the IsPlayerInArea like I asked as he uses it completly wrong.