Pickups Problem
#1

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

do you get any error ?
Reply
#3

nah , no errors.
Reply
#4

Use SetPlayerPos along with that.
Reply
#5

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;
    }
}
else if you are using CreateDynamicPickup() then use
pawn Код:
new Skills_Point =  CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);

OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == Skills_Point)
    {
        SetPlayerInterior(playerid,7);
        return 1;
    }
}
Reply
#6

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

Well show us your CreatePickup code and as someone said above -> setting interior isnt enough, you need also setplayerpos
Reply
#8

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

bla bla bla... TYPE OF PICKUP IS ALSO IMPORTANT! Not every type cooperate with onplayerpickup and pos is here for example : http://weedarr.wikidot.com/interior
Reply
#10

Quote:
Originally Posted by Matess
Посмотреть сообщение
bla bla bla... TYPE OF PICKUP IS ALSO IMPORTANT! Not every type cooperate with onplayerpickup and pos is here for example : http://weedarr.wikidot.com/interior
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)