Check last pickup
#1

Heey all,
How can i check the last pickup for some time?
Example: if player enters a pickup he can use a command and if the player leaves it he can use the command without entering the pickup for a time.

Variable will not working for this. Its needs to be on a other way.(pvarint or something)

Thanks admigo
Reply
#2

pawn Код:
//top of script
new LastPickup[MAX_PLAYERS];

//public OnPlayerPickupPickup(playerid, pickupid)
//{
    //do whatever you want
    LastPickup[playerid] = pickupid;
    SetTimerEx("ResetLastPickup", /*time*/, false, "i", playerid);
//}
forward public ResetLastPickup(playerid);
public ResetLastPickup(playerid) return LastPickup[playerid] = -1,1;
i cant see why regular variables cant be used in this...
Reply
#3

I just have problem with my robhouse command. I want to make a houserobbery if player is in house but all time its if player is in pickup and i dont know how i can detect the playerid,only its detects the owner in pickup
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)