would this be possible
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
You'll have to use OnPlayerKeyStateChange to detect them pressing ENTER* then call OnPlayerEditObject with CallLocalFunction.

* Keys don't work on actual keys, but assignments. You example, you can detect when a player presses SPRINT, the assignment, but not for example the spacebar. You'd have to use KEY_SECONDARY_ATTACK (which is the vehicle enter/exit assignment). This is ENTER/F by default but can be changed.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_SECONDARY_ATTACK)) CallLocalFunction(.. see wiki for params ..);
    return 1;
}
Thanks I got it all do PRESSED did not seem to work so I just used
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
Reply


Messages In This Thread
enter OnPlayerEditObjects - by horsemeat - 22.06.2013, 20:57
Re: would this be possible - by MP2 - 22.06.2013, 21:09
Re: would this be possible - by horsemeat - 22.06.2013, 21:35
Re: would this be possible - by MP2 - 22.06.2013, 21:39
Re: would this be possible - by horsemeat - 22.06.2013, 21:44
Re: would this be possible - by Pottus - 22.06.2013, 21:47
Re: would this be possible - by horsemeat - 22.06.2013, 21:49
Re: would this be possible - by horsemeat - 22.06.2013, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)