16.11.2010, 18:28
You would make use of OnPlayerKeyStateChange, for example:
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.
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.
}
}

