How to make a key instead of typing /enter+/exit?
#4

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
You would make use of OnPlayerKeyStateChange, for example:

pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if(newkeys & keyid) // You need to find the keyID for the key that you want to be pressed to do this
    {
        OnPlayerCommandText(playerid,"/enter");
        // Alternatively you could paste the contents of the "/enter" command here.
    }
}
As for the /toggleenter, you just need to implement a simple variable that's either true or false, then implementing it in a /toggleenter command and in the OnPlayerKeyState function.

Oh, hmm will this be for all entrances and exiting places?



Ah I have put them now, but there are 2 Errors:

Код:
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(11510) : error 017: undefined symbol "newkeys"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(11514) : error 017: undefined symbol "newkeys"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)