OnPlayerPickUpPickup
#1

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
        switch(pickupid)
        {
               case pickup_health:
               {
                      SetPlayerHealth(playerid, 100);
               }
               return 1;
        }
	return 0;
}
Why this type of function is not working??
Reply
#2

not a expert
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == health_100)
    {
        
SetPlayerHealth(playerid100);
    }
    return 
1;

make sure there's already a pickup called 'health_100' or what ever
PHP код:
new health_100
public OnFilterScriptInit() OR public OnGameModeInit()
PHP код:
health_100 CreatePickup(124020.00.00.0); //replace coordinates 
Reply
#3

Use OnPlayerPickUpDynamicPickup

Код:
new health_100;

public OnGameModeInit()
{
health_100=CreateDynamicPickup(1240,2,0,0,0,-1);
}

public OnPlayerPickUpDynamicPickup(playerid,pickupid)
{
	if(pickupid==health_100)
	{
		SetPlayerHealth(playerid, 100); 
	}
        return 1; 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)