KEY_YES - Bug or what ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: KEY_YES - Bug or what ? (
/showthread.php?tid=446840)
KEY_YES - Bug or what ? -
nGen.SoNNy - 27.06.2013
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" );
}
Re: KEY_YES - Bug or what ? -
Necip - 27.06.2013
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" );
}
Re: KEY_YES - Bug or what ? -
nGen.SoNNy - 27.06.2013
It's the same thing
Re: KEY_YES - Bug or what ? -
MP2 - 27.06.2013
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");
Re: KEY_YES - Bug or what ? -
nGen.SoNNy - 27.06.2013
But why that thing it's working in vehicle but onfoon no ?