The Pawno Question?:o
#1

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
Reply
#2

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

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
Reply
#4

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

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;
	}
Reply
#6

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

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

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!
Reply
#9

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 >.>
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)