can't take HP pickup on interiors
#1

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == Health[playerid])
    {
        new 
Float:h;
        
GetPlayerHealth(playeridh);
        
SetPlayerHealth(playeridh+10.0);
        
DestroyPickup(pickupid);
    }
    return 
1;

??
Reply
#2

how do you create the pickups ?
Reply
#3

PHP код:
    new Float:x,Float:y,Float:z;
    
GetPlayerPos(playerid,x,y,z);
    
Health[playerid] = CreatePickup(1240,4,x,y,z+0.2,GetPlayerVirtualWorld(playerid));
    
SetTimerEx("Health_Timer"10000false"i"playerid); 
Reply
#4

You could try Type 1 here.

Type 4 will disappear after 15-20 seconds and respawn on death. Since you destroy it when picking it up, this type shouldn't be neccessary.
Reply
#5

Quote:
Originally Posted by NaS
Посмотреть сообщение
You could try Type 1 here.

Type 4 will disappear after 15-20 seconds and respawn on death. Since you destroy it when picking it up, this type shouldn't be neccessary.
What you mean by type 4
Reply
#6

he means to change the type of the pickup in the params

PHP код:
CreatePickup(modeltypeFloat:XFloat:YFloat:Zvirtualworld
like this

PHP код:
CreatePickup(model1Float:XFloat:YFloat:Zvirtualworld
Reply
#7

Quote:
Originally Posted by wallen
Посмотреть сообщение
What you mean by type 4
Try changing this:
Код:
new Float:x,Float:y,Float:z; 
GetPlayerPos(playerid,x,y,z); 
Health[playerid]=CreatePickup(1240,4,x,y,z+0.2,GetPlayerVirtualWorld(playerid));
SetTimerEx("Health_Timer", 10000, false, "i", playerid);
To this:
Код:
new Float:x,Float:y,Float:z; 
GetPlayerPos(playerid,x,y,z); 
Health[playerid]=CreatePickup(1240,1,x,y,z+0.2,GetPlayerVirtualWorld(playerid));
SetTimerEx("Health_Timer", 10000, false, "i", playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)