Command + key...Won't return correctly. - 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: Command + key...Won't return correctly. (
/showthread.php?tid=313585)
Command + key...Won't return correctly. -
Dokins - 26.01.2012
I know this doesnt work but how would I get it to work?
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsKeyJustDown(KEY_SPRINT, newkeys, oldkeys))
{
return cmd_eon(playerid, params);
}
}
}
Re: Command + key...Won't return correctly. -
Twix[KDZ] - 26.01.2012
u probably need
return 1;
}
return 0;
Im not sure about this one, i think u have to wait for some others then
Re: Command + key...Won't return correctly. -
MP2 - 26.01.2012
Add prints to debug.
Re: Command + key...Won't return correctly. -
Konstantinos - 26.01.2012
First all all you should return a value at the end of the callback. It might be possible but my brain doesn't work right now

I can't thing something to add the params into the OnPlayerKeyStateChange Callback.
Re: Command + key...Won't return correctly. -
Dokins - 26.01.2012
the actual issue is it's not getting the params, but i'm not sure how to pass them to the public.
Re: Command + key...Won't return correctly. -
Babul - 26.01.2012
whats your cmd:eon()? is it to turn on the engine? if so, then try "" instead of params, its an empty string, if the command doesnt take any parameter.
pawn Код:
return cmd_eon(playerid, "");
or
pawn Код:
return cmd_eon(playerid, 0);
oh btw: i assume that params is not defined yet. did it compile? o.O