17.12.2013, 21:17
Is there a way to use the same KEY_SECONDARY_ATTACK to exit?
I've tried this, but it does not work. I can enter. But not exit using the same key.
I've tried this, but it does not work. I can enter. But not exit using the same key.
Quote:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if( newkeys & KEY_SECONDARY_ATTACK ){ return OnPlayerCommandText(playerid, "/enter"); // return true; } if( newkeys & KEY_SECONDARY_ATTACK ){ return OnPlayerCommandText(playerid, "/exit"); // return true; } |