Author Topic: cmd problem  (Read 5559 times)

0 Members and 2 Guests are viewing this topic.

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: cmd problem
« Reply #15 on: January 05, 2012, 10:56:31 pm »
I hope when you use 406 and 407, you mean actual pickup IDs.

pickupid is NOT THE SAME AS THE MODEL OF THE PICKUP.
Do not PM me for support.




Offline Morphine

  • Made Man
  • ***
  • Posts: 109
    • View Profile
Re: cmd problem
« Reply #16 on: January 06, 2012, 11:42:10 am »
Woops, then it would be the first value you specified in AddStaticPickup.

Code: [Select]
public OnPickedUp(pickupid, playerid)
{
if( pickupid == 1 ) // The Pickup number here
{
SendClientMessage(playerid, COLOR_YELLOW, "Esto es un Pickup ID 407" );
return 1;
}
    else if( pickupid == 2)   // The second pickup number here
{
SendClientMessage(playerid, COLOR_YELLOW, "Esto es un Pickup ID 406" );
       
  return 1; // And you are lose in this
                }
}

Something like this. I don't know what your Pickup IDs are so configure them yourself.
« Last Edit: January 06, 2012, 12:06:50 pm by Morphine »

Offline shaeel ahmed

  • Street Thug
  • *
  • Posts: 11
    • View Profile
Re: cmd problem
« Reply #17 on: January 07, 2012, 05:36:53 am »
guys u cant help me but i made this cmd my own it works
public OnPickedUp( pickupid, playerid )
{
if(pickupid = 526)
{
SetPlayerWeapon(playerid,32,9999999);
}
else if(pickupid = 510)
{
SetPlayerHealth(playerid,100.0);
 }
return 1;
}

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: cmd problem
« Reply #18 on: January 07, 2012, 11:56:31 am »
That thing won't work. The first pickup you add to your script, pickupid is 1. So AddStaticPickup( 1, 526, X, Y, Z ). So, whenever you put
Code: [Select]
if( pickupid == 1), it will refer to the first pickup..
I'm beginning to feel like a Lag God, Lag God