Weapon pickup doesn't disappear?
#1

I made this:
Code:
	new weaponmodel;
	new weapid = GetPlayerWeapon(playerid);
	switch(weapid)
	{
 		case 27: weaponmodel = 351;
		case 29: weaponmodel = 353;
 		case 30: weaponmodel = 355;
		case 31: weaponmodel = 356;
		case 24: weaponmodel = 348;
		case 25: weaponmodel = 349;
	}
	if(weapid != 0 && weapid == 27 || weapid == 29 || weapid == 30 || weapid == 31 || weapid == 24 || weapid == 25)
	{
		new Float:posx, Float:posy, Float:posz;
		GetPlayerPos(playerid, posx, posy, posz);
		CreatedPickup[playerid] = CreatePickup(weaponmodel,15,posx,posy,posz,0);
	}
It disappear when I take it, But when I enter an interior and exit it, the pickup is back?
Reply
#2

https://sampwiki.blast.hk/wiki/PickupTypes

maybe try 22
Reply
#3

Respawns after dead
I need Pickupable, never respawns.
But I tried 15 and 2.
When I enter and interior they come back...
Reply
#4

example

pawn Code:
OnPlayerPickupPickup() //look for this in your script
{
  if(pickupid == CreatedPickup[playerid]) //change it to your pickup
  {
    //Do what you want to be done here or leave this
    DestroyPickup(CreatedPickup[playerid]);
  }
}

Reply
#5

I think its bugged with more players because the [playerid]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)