Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: VC[88]PD on February 04, 2013, 12:38:33 pm

Title: [I have question again] Pickup command question
Post by: VC[88]PD on February 04, 2013, 12:38:33 pm
Hi,everyone.I've write this,but when I pick these,nothing happen.
[pawn]public OnPickedUp(pickupid, playerid)
{
if ( pickupid == 287)
{
GivePlayerWeapon(playerid, 30, 500);
}
else if ( pickupid == 289)
{
GivePlayerWeapon(playerid, 32, 500);
}
else if ( pickupid == 275)
{
GivePlayerWeapon(playerid, 18, 500);
}
else if ( pickupid == 272)
{
GivePlayerWeapon(playerid, 15, 500);
}
else if ( pickupid == 279)
{
GivePlayerWeapon(playerid, 21, 500);
}
else if ( pickupid == 280)
{
GivePlayerWeapon(playerid, 26, 500);
}
else if ( pickupid == 286)
{
GivePlayerWeapon(playerid, 29, 500);
}
else if ( pickupid == 276)
{
GivePlayerWeapon(playerid, 27, 500);
}
else if ( pickupid == 282)
{
GivePlayerWeapon(playerid, 23, 500);
}
else if ( pickupid == 291)
{
GivePlayerWeapon(playerid, 13, 500);
}
else if ( pickupid == 268)
{
GivePlayerWeapon(playerid, 10, 500);
}
return 1;
}[/pawn]
Please Tell Me!
Title: Re: [I have question again] Pickup command question
Post by: VC[88]PD on February 04, 2013, 12:43:08 pm
 ???I really don't know how to fix it.
Title: Re: [I have question again] Pickup command question
Post by: mrockxkingbutt on February 04, 2013, 02:00:18 pm
you have to add pickups  first addstaticpickup(id,type,floatx,floaty,floatz.
Title: Re: [I have question again] Pickup command question
Post by: VC[88]PD on February 04, 2013, 02:46:24 pm
you have to add pickups  first addstaticpickup(id,type,floatx,floaty,floatz.
I have.
Title: Re: [I have question again] Pickup command question
Post by: sseebbyy on February 04, 2013, 03:57:43 pm
Use Pickup ID not Pickup Model ID !

+ when you pick up an weapon , you will get that weapon, so you don't need to put a function for that. (maybe just if you want to set an amount of ammo)
Title: Re: [I have question again] Pickup command question
Post by: mrockxkingbutt on February 04, 2013, 04:58:49 pm
question solved by sseebbyy
Title: Re: [I have question again] Pickup command question
Post by: VC[88]PD on February 04, 2013, 05:55:08 pm
Use Pickup ID not Pickup Model ID !

+ when you pick up an weapon , you will get that weapon, so you don't need to put a function for that. (maybe just if you want to set an amount of ammo)
ye,I want to set that.But how to look pick up ID ?Use a command?
Title: Re: [I have question again] Pickup command question
Post by: sseebbyy on February 04, 2013, 05:58:02 pm
When you create a pickup, you have to use:

Code: [Select]
AddStaticPickup(id, model id, x, y, z);
So, you can see the id at that pickup created.
Title: Re: [I have question again] Pickup command question
Post by: VC[88]PD on February 04, 2013, 06:15:43 pm
When you create a pickup, you have to use:

Code: [Select]
AddStaticPickup(id, model id, x, y, z);
So, you can see the id at that pickup created.
but...
[pawn]AddStaticPickup(sp++,287,-409.4112,-555.8333,39.8474);[/pawn]
Title: Re: [I have question again] Pickup command question
Post by: VC[88]PD on February 05, 2013, 10:38:55 am
When you create a pickup, you have to use:

Code: [Select]
AddStaticPickup(id, model id, x, y, z);
So, you can see the id at that pickup created.
Ok,I know ,thanks