OnPlayerPickUpPickup
#1

Hello everyone!! so im going here to show you this code what's wrong here!!! i using multi-places for exit! so

My Problem is:- After i exit Sexshop im teleporter to another placing see.

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
   if(pickupid  == BankEnter1)
   {
	  SetPlayerPos(playerid, 2311.4116,-15.3199,26.7422);
   }
   if(pickupid == BankExit1)
   {
	  SetPlayerPos(playerid, 2357.6628,2377.7422,10.8203);
	  SetPlayerInterior(playerid, 0);
   }
   if(pickupid == Ammu2[1])
   {
	  SetPlayerPos(playerid, 2156.5938,943.8235,10.8203);
	  SetPlayerInterior(playerid, 0);
   }
   if(pickupid == SexShop2[1])
   {
	  SetPlayerPos(playerid, 2089.6003,2073.9395,10.8203);
	  SetPlayerInterior(playerid, 0);
   }
   if(pickupid == Burger2[1])
   {
	  SetPlayerPos(playerid, 2363.6062,2071.2256,10.8203);
	  SetPlayerInterior(playerid, 0);
   }
   if(pickupid == Cluckin2[1])
   {
	  SetPlayerPos(playerid, 2393.3035,2045.1500,10.8203);
	  SetPlayerInterior(playerid, 0);
   }
   if(pickupid == SexShop2[2])
   {
	  SetPlayerPos(playerid, 2419.7517,2062.9844,10.8125);
	  SetPlayerInterior(playerid, 0);
   }
   if(pickupid == Bar2[1])
   {
	  SetPlayerPos(playerid, 2440.8730,2062.3020,10.8203);
	  SetPlayerInterior(playerid, 0);
   }
   if(pickupid == Burger2[2])
   {
	  SetPlayerPos(playerid, 2469.3982,2034.7217,11.0625);
	  SetPlayerInterior(playerid, 0);
   }
   return 1;
}
Reply
#2

Do you have the right coordinates set?
Reply
#3

Not sure but why don't you use elseif...
Reply
#4

Here my pickpus

Код:
    BankEnter1 = CreatePickup(19605,2,2364.1509,2377.5205,10.8203,0);
    BankExit1 = CreatePickup(19605,2,2307.0815,-16.1236,26.7496, 0);
    SexShop2[1] = CreatePickup(19605,2,-100.3613,-25.0381,1000.7188, 0);
    SexShop2[2] = CreatePickup(19605,2,-100.3613,-25.0381,1000.7188, 0);
    Cluckin2[1] = CreatePickup(19135,2,364.9540,-11.8211,1001.8516, 0);
    Ammu2[1] = CreatePickup(19135,2,315.6982,-143.6353,999.6016, 0);
    Bar2[1] = CreatePickup(19135,2,501.9963,-67.5630,998.7578, 0);
    Burger2[1] = CreatePickup(19135,2,362.9752,-75.2719,1001.5078, 0);
    Burger2[2] = CreatePickup(19135,2,362.9752,-75.2719,1001.5080, 0);
I Already edited it to Else if

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
   if(
pickupid  == BankEnter1)
   {
      
SetPlayerPos(playerid2311.4116,-15.3199,26.7422);
   }
   else if(
pickupid == BankExit1)
   {
      
SetPlayerPos(playerid2357.6628,2377.7422,10.8203);
      
SetPlayerInterior(playerid0);
   }
   else if(
pickupid == Ammu2[1])
   {
      
SetPlayerPos(playerid2156.5938,943.8235,10.8203);
      
SetPlayerInterior(playerid0);
   }
   else if(
pickupid == SexShop2[1])
   {
      
SetPlayerPos(playerid2089.6003,2073.9395,10.8203);
      
SetPlayerInterior(playerid0);
   }
   else if(
pickupid == Burger2[1])
   {
      
SetPlayerPos(playerid2363.6062,2071.2256,10.8203);
      
SetPlayerInterior(playerid0);
   }
   else if(
pickupid == Cluckin2[1])
   {
      
SetPlayerPos(playerid2393.3035,2045.1500,10.8203);
      
SetPlayerInterior(playerid0);
   }
   else if(
pickupid == SexShop2[2])
   {
      
SetPlayerPos(playerid2419.7517,2062.9844,10.8125);
      
SetPlayerInterior(playerid0);
   }
   else if(
pickupid == Bar2[1])
   {
      
SetPlayerPos(playerid2440.8730,2062.3020,10.8203);
      
SetPlayerInterior(playerid0);
   }
   else if(
pickupid == Burger2[2])
   {
      
SetPlayerPos(playerid2469.3982,2034.7217,11.0625);
      
SetPlayerInterior(playerid0);
   }
   return 
1;

Reply
#5

Is there a CreateDynamicPickup?
Reply
#6

Yes.
Reply
#7

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Yes.
Can you give me a Tutoiral for CreateDynamicPickup ? And OnPlayerDynamicPickup
Reply
#8

createpickup and createdynamicpickup are the same thing, i doubt you will need a tutorial for learning createdynamicpickup. Just learn the syntax and you are up and ready.
Reply
#9

Hello, i dont have a problems of my codes only there a small problem...

After i exit some shops i'll exit from differnt's stores!! I MEAN If same Interiors i'll exit from differn't store!.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)