PDA

View Full Version : IsPlayerNotInAnyPickup


Admigo
22/11/2011, 11:39 AM
Heey all,
How can i detect if a players is not in any pickup so i can make function for hiding the textdraws?
Thnks Admigo

System64
22/11/2011, 11:45 AM
if(!IsPlayerInRangeofPickup(playerid, distance, coordinates of pickup)) ?

Jakku
22/11/2011, 12:36 PM
Use a timer

Sascha
22/11/2011, 02:36 PM
just use this:

new InPickup[playerid];

public OnPlayerConnect(playerid)
{
InPickup[playerid] = 0;
return 1;
}

public OnPlayerSpawn(playerid)
{
InPickup[playerid];
return 1;
}

public OnPlayerPickupPickUp(playerid, pickupid)
{
InPickup[playerid] = 1;
SetTimerEx("OutOfPickup", 2000, false, "i", playerid);
return 1;
}

forward OutOfPickup(playerid);
public OutOfPickup(playerid)
{
InPickup[playerid] = 0;
return 1;
}

stock IsPlayerInAnyPickup(playerid)
{
return InPickup[playerid];
}

(for example... )