19.10.2011, 19:08
RC6 !!!ROCKS, woow thanks kalcor
- Increased MAX_PLAYER_ATTACHED_OBJECTS to 10. |
I'm sure that's a bug.
We should have a callback/function for detecting whether or not a player has gone to GTA "pause" menu or not. |
public OnPlayerUpdate(playerid)
{
new ud,lr,keys;
GetPlayerKeys(playerid,keys,ud,lr);
if(keys==KEY_YES)SendClientMessage(playerid,-1,"YES");
else if(keys==KEY_NO)SendClientMessage(playerid,-1,"NO");
else if(keys==KEY_CTRL_BACK)SendClientMessage(playerid,-1,"CTRL BACK");
return true;
}
Ex. how to use the new Keys:
pawn Код:
|
Ex. how to use the new Keys:
pawn Код:
|
public OnPlayerUpdate(playerid)
{
new ud,lr,keys,yes,no,back;
GetPlayerKeys(playerid,keys,ud,lr,yes,no,back);
if(keys==yes)SendClientMessage(playerid,-1,"YES");
else if(keys==no)SendClientMessage(playerid,-1,"NO");
else if(keys==back)SendClientMessage(playerid,-1,"CTRL BACK");
return true;
}
Should be something like this:
pawn Код:
|
pawn Код:
|
SA-MP doesn't sync individual keys. The name of these functions are a bit misleading. They are not keys but actually the GTA:SA controls. I said they were the Y,N,H keys but that's only the default on an English keyboard. They are actually what ever you have set in the SA menu -> Controller Setup -> Foot controls for: Conversation Yes, Conversation No, Group control backward. That could be a keyboard key, a joystick button, a mouse button etc.
A lot of players don't actually use the keyboard and mouse to play, they use a game controller. They only switch to the keyboard for typing messages. |
The game will not pause when you enter the menu. |