IsPlayerNotInAnyPickup - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IsPlayerNotInAnyPickup (
/showthread.php?tid=298709)
IsPlayerNotInAnyPickup -
Admigo - 22.11.2011
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
Re: IsPlayerNotInAnyPickup -
System64 - 22.11.2011
if(!IsPlayerInRangeofPickup(playerid, distance, coordinates of pickup)) ?
Re: IsPlayerNotInAnyPickup -
Jakku - 22.11.2011
Use a timer
Re: IsPlayerNotInAnyPickup -
Sascha - 22.11.2011
just use this:
pawn Код:
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... )