KEY_YES - Bug or what ?
#1

Hey guys ! On my server when i press Y Key in a vehicle the vehicle get flip and when player is onfoot the Help menu will apear.

My problem: In vehicle it's working but the help menu onfoot don't show

pawn Код:
if ( newkeys & KEY_YES )
    {
        if ( IsPlayerInAnyVehicle( playerid ) )
        {
            new iSeat = GetPlayerVehicleSeat(playerid);
            if( iSeat == 0 )
            {
                CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/flip" );
            }
            else InfoTD_MSG( playerid, 5000, "~w~~h~You are not the ~r~~h~Driver" );
        }
        else CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/help" );
    }
Reply
#2

I am not sure but try this
pawn Код:
if ( newkeys & KEY_YES )
    {
        if ( IsPlayerInAnyVehicle( playerid ) )
        {
            new iSeat = GetPlayerVehicleSeat(playerid);
            if( iSeat == 0 )
            {
                CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/flip" );
            }
            else InfoTD_MSG( playerid, 5000, "~w~~h~You are not the ~r~~h~Driver" );
        }
        else CallRemoteFunction( "OnPlayerCommandText", "is", "/help" );
    }
Reply
#3

It's the same thing
Reply
#4

I know strings aren't supported by SetTimerEx, but I'm not sure about CallLocal/RemoteFunction. perhaps strings don't work in those either.

Add a debug print/SCM to see if CallRemoteFunction is actually being called.

If the callback is in the same script, you can just call it like a function anyway: OnPlayerCommandText(playerid, "/blah");
Reply
#5

But why that thing it's working in vehicle but onfoon no ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)