How to enter building using ALT?
#4

Quote:
Originally Posted by Sensitive
Посмотреть сообщение
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!
I guess you mean 'icon' that's pickups right?
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
Reply


Messages In This Thread
How to enter building using ALT? - by Sensitive - 28.04.2011, 09:55
Re: How to enter building using ALT? - by Lorenc_ - 28.04.2011, 10:05
Re: How to enter building using ALT? - by Sensitive - 28.04.2011, 10:06
Re: How to enter building using ALT? - by [DDC]Delight - 28.04.2011, 10:14
Re: How to enter building using ALT? - by Sensitive - 28.04.2011, 16:38
Re: How to enter building using ALT? - by Sascha - 28.04.2011, 17:18
Re: How to enter building using ALT? - by Aldi96 - 28.04.2011, 17:28
Re: How to enter building using ALT? - by Sascha - 28.04.2011, 17:31

Forum Jump:


Users browsing this thread: 1 Guest(s)