19.01.2016, 10:21
Okay I have a function that toggles the cursor when the Y is pressed
It works well when i want to activate the cursor but when i want to disable it (when SelectTextDraw is active) its not registering any keys on KeyStateChange
It works well when i want to activate the cursor but when i want to disable it (when SelectTextDraw is active) its not registering any keys on KeyStateChange
PHP Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if(newkeys & KEY_YES){
if(!guiActive[playerid]){
SelectTextDraw(playerid, 255);
guiActive[playerid] = true;
} else if(guiActive[playerid]) {
CancelSelectTextDraw(playerid);
guiActive[playerid] = false;
}
}
return true;
}