Posts: 366
Threads: 113
Joined: Feb 2014
Hello , i made pickup inside Ammunation . The pickup is visible but the OnPlayerPickupPickup Don't work .
Following is my OnPlayerPickupPickup code.
PHP код:
if(pickupid == Skills_Point)
{
SetPlayerInterior(playerid,7);
return 1;
}
I want to set the player interior to Ammunation booths and its interior id is 7 but it isn't working.
Posts: 366
Threads: 113
Joined: Feb 2014
Posts: 1,942
Threads: 89
Joined: Nov 2010
Reputation:
0
Use SetPlayerPos along with that.
Posts: 366
Threads: 113
Joined: Feb 2014
Quote:
Originally Posted by VishvaJeet
if you are using CreatePickup() then use
pawn Код:
new Skills_Point = CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld);
OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == Skills_Point) { SetPlayerInterior(playerid,7); return 1; } }
|
I am using this command but it isn't working.
Posts: 371
Threads: 5
Joined: Oct 2007
Reputation:
0
Well show us your CreatePickup code and as someone said above -> setting interior isnt enough, you need also setplayerpos
Posts: 366
Threads: 113
Joined: Feb 2014
Quote:
Originally Posted by Matess
Well show us your CreatePickup code and as someone said above -> setting interior isnt enough, you need also setplayerpos
|
PHP код:
new Skills_Point;
public OnGameModeInit()
{
Skills_Point= CreatePickup(bla bla bla);
}
Public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Skills_Point)
{
SetPlayerInterior(playerid,7);
return 1;
}
}
Where to set SetPlayerPos?
Posts: 366
Threads: 113
Joined: Feb 2014
Quote:
Originally Posted by Matess
|
PHP код:
new Skills_Point;
public OnGameModeInit()
{
Skills_Point= Skills_Point = CreatePickup(1318,1,286.2281,-30.3801,1001.5156,0);
}
Public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Skills_Point)
{
SetPlayerInterior(playerid,7);
return 1;
}
}
The exact cooredinates and model and spawn types of that pickups are above .
I know the interior and i selected from it which is id 7.