Dynamic pickup [HELP]
#1

Hi,
I have two entrances door from two locations.
SetPlayerPos both one locations.
And
I have two exit door from one locations.
SetPlayerPos is two places.

When I get out from both. PizEx is its location.
I tried to fix this problem with MAX_SHOP and MAX_PLAYERS. But it not fix.
Sry, My English is not so good.

Thanks .

Example:
Код:
new PizEn[MAX_SHOP][MAX_PLAYERS];
new PizEx[MAX_SHOP][MAX_PLAYERS];
new PizzaCEn[MAX_SHOP][MAX_PLAYERS];
new PizzaCEx[MAX_SHOP][MAX_PLAYERS];
new PizGEn[MAX_SHOP][MAX_PLAYERS];
new PizGEx[MAX_SHOP][MAX_PLAYERS];

(OnPlayerConnect)
PizEn[1][playerid] =    CreateDynamicPickup(1559,1,x,y,z,-1,-1,-1,100);
PizEx[1][playerid] =    CreateDynamicPickup(1559,1,22,22,22,-1,-1,-1,100); // ===

PizzaCEn[2][playerid] = CreateDynamicPickup(1559,1,x,y,z,-1,-1,-1,50);
PizzaCEx[2][playerid] = CreateDynamicPickup(1559,1,22,22,22,-1,-1,-1,100); // ===

PizGEn[3][playerid] =   CreateDynamicPickup(1559,1,x,y,z,-1,-1,-1,100);
PizGEx[3][playerid] =   CreateDynamicPickup(1559,1,x,y,z,-1,-1,-1,100);
	
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
	if(pickupid == PizEn[1][playerid]) // ===
	{
	    SetPlayerInterior(playerid,5);
	    SetPlayerPos(playerid,33,33,33);
	    SetPlayerFacingAngle(playerid,0);
	    SetCameraBehindPlayer(playerid);
	}
	if(pickupid == PizEx[1][playerid])
	{
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,x,y,z);
	    SetPlayerFacingAngle(playerid,225);
	    SetCameraBehindPlayer(playerid);
	}
		if(pickupid == PizzaCEn[2][playerid]) // ===
	{
	    SetPlayerInterior(playerid,5);
	    SetPlayerPos(playerid,33,33,33);
	    SetPlayerFacingAngle(playerid,0);
	    SetCameraBehindPlayer(playerid);
	}
	if(pickupid == PizzaCEx[2][playerid])
	{
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,x,y,z);
	    SetPlayerFacingAngle(playerid,225);
	    SetCameraBehindPlayer(playerid);
	}
    if(pickupid == PizGEn[3][playerid])
	{
	    SetPlayerInterior(playerid,17);
	    SetPlayerPos(playerid,x,y,z);
	    SetPlayerFacingAngle(playerid,0);
	    SetCameraBehindPlayer(playerid);
	}
	if(pickupid == PizGEx[3][playerid])
	{
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,x,y,z);
	    SetPlayerFacingAngle(playerid,225);
	    SetCameraBehindPlayer(playerid);
	}
	return 1;
}
Reply


Messages In This Thread
Dynamic pickup [HELP] - by MRM - 24.03.2016, 17:18
Re: Dynamic pickup [HELP] - by Vince - 24.03.2016, 17:56
Re: Dynamic pickup [HELP] - by MRM - 24.03.2016, 19:53
Re: Dynamic pickup [HELP] - by zPain - 24.03.2016, 20:08
Re: Dynamic pickup [HELP] - by MRM - 24.03.2016, 20:15
Re: Dynamic pickup [HELP] - by MRM - 25.03.2016, 12:19

Forum Jump:


Users browsing this thread: 2 Guest(s)