Código:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if(newkeys == KEY_SPRINT && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { // quando apertar 'H' NO POSTO
if(IsPlayerInRangeOfPoint(playerid, 7, 1939.1224, -1775.5885, 12.9718)) {
TogglePlayerControllable(playerid, 0);
for(new pc; pc != 4; pc++) PlayerTextDrawShow(playerid, PostGas[playerid][pc]);
}
}
else if(newkeys == KEY_HANDBRAKE) { // quando apertar 'ESPAÇO' NO POSTO
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
TogglePlayerControllable(playerid, 1);
for(new pc; pc != 4; pc++) PlayerTextDrawHide(playerid, PostGas[playerid][pc]);
}
}
return 1;
}