28.04.2011, 10:14
Quote:
You can read everything in title.
But i want to use it on GTA:RP, becouse if you walk into icon, than you will enter building. I hate that. Please help! |
In that case..
Try this:
pawn Код:
//On top of the script
#define KEY_WALK 1024 // This might not be necessary
new HasEntered[MAX_PLAYERS];
new KillThatThing;
//Under OnPlayerConnect
HasEntered[playerid] = 0;
//Under OnPlayerDisconnect
HasEntered[playerid] = 0;
//Under OnPlayerPickupPickup
//Place this under the desired pickup
HasEntered[playerid] = 1;
KillThatThing = SetTimer("KillEntering", 10000, 0);
OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(HasEntered[playerid] == 1)
{
if(newkeys == 1024)
{
//Do the setplayerpos here
HasEntered[playerid] = 0;
KillTimer(KillThatThing);
}
}
return 1;
}
forward KillEntering(playerid);
public KillEntering(playerid)
{
HasEntered[playerid] = 0;
}
NOTE: This ain't tested cuz im at work, have it a go tell me if there's anything wrong