OnPlayerPickupPickup Problem
#1

hello =)
Im trying to make more then one Pickup that teleport you but when im in the game, only the firts pickup works for me and the others just don't teleport you...

so this is my code:

this is in the top of the script:
PHP код:
new prohqmoll;
new 
prohqrace;
new 
prohqair;
new 
prohqparty;
new 
prohqbunker
this is in "OnGameModeInIt":
PHP код:
    prohqmoll AddStaticPickup123913172.8423,-14.6863,2.3266 ); // from Base to PrO HQ Moll
    
prohqparty AddStaticPickup131413037.4607,119.1399,309.0864 ); // from Moll to Party
    
prohqair AddStaticPickup131013032.8909,124.4601,309.0792 ); // from Moll to HQ Air Jump
    
prohqbunker AddStaticPickup127313037.7549,129.5287,309.0851 ); // from Moll to Bunker
    
prohqrace AddStaticPickup123313042.3228,124.4189,309.0880 ); // from Moll to Race 
and this is the new public "OnPlayerPickupPickup":
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid==prohqmoll)
     {
    
SetPlayerPos(playerid3044.4688,111.1542,311.4653);
    
SetPlayerFacingAngle(playerid40.7671);
    
SetPlayerInterior(playerid,0);
    
SendClientMessage(playerid0xFFFF00AA"BlaBlaBla");
    return 
1;
     }
     if(
pickupid==prohqrace)
     {
    
SetPlayerPos(playerid3005.9109,-77.7580,1137.3007);
    
SetPlayerFacingAngle(playerid299.0028);
    
SetPlayerInterior(playerid,0);
    
SendClientMessage(playerid0xFFFF00AA"BlaBlaBla");
    return 
1;
     }
    if(
pickupid==prohqair)
     {
    
SetPlayerPos(playerid3339.5994,122.1895,827.5738);
    
SetPlayerFacingAngle(playerid91.8642);
    
SetPlayerInterior(playerid,0);
    
SendClientMessage(playerid0xFFFF00AA"BlaBlaBla");
    return 
1;
     }
     if(
pickupid==prohqbunker)
     {
     
SetPlayerPos(playerid3238.2368,65.0437,10.9989);
    
SetPlayerFacingAngle(playerid94.3709);
    
SetPlayerInterior(playerid,0);
    
SendClientMessage(playerid0xFFFF00AA"BlaBlaBla");
    return 
1;
     }
     if(
pickupid==prohqparty)
     {
    
SetPlayerPos(playerid3039.2349,107.5791,286.9293);
    
SetPlayerFacingAngle(playerid3.1667);
    
SetPlayerInterior(playerid,0);
    
SendClientMessage(playerid0xFFFF00AA"BlaBlaBla");
    return 
1;
     }
     return 
0;

Please help =)
Reply
#2

Try printing out the pickupid when you enter it (In OnPlayerPickUpPickup)

Like so;
pawn Код:
printf("I entered: %i pickup", pickupid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)