addEventHandler ( "onClientPlayerSelectGamemode", player,
function ( gm )
if gm ~= "race" then return end
--some gui
t1 = setTimer ( triggerServerEvent, 12000, 1, "onPlayerRaceEnter", player )
addEventHandler ( "onClientKey", root, onPlayerClientKey )
end
)
attrs = 0
function onPlayerClientKey( button, press )
if ( press and button == "F9" and attrs ~= 1) then
killTimer ( t1 )
attrs = attrs + 1
--some gui stuff
elseif ( press and button == "F9" and attrs == 1 ) then
attrs = attrs + 1
--some gui stuff.
if ( press and button == "Y" and attrs == 2 ) then
triggerServerEvent ( "onPlayerRaceEnter", player )
--gui stuff
elseif ( press and button == "N" and attrs == 2 ) then
--gui stuff
call ( getResourceFromName ( "npg_general" ), "onClientPlayerRedirectFromRace", player )
end
end
end
When it comes to "Y" or "N" it simply doesn't do the rest of the code.