Command + key...Won't return correctly.
#1

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);
        }
    }
}
Reply
#2

u probably need
return 1;
}
return 0;

Im not sure about this one, i think u have to wait for some others then
Reply
#3

Add prints to debug.
Reply
#4

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.
Reply
#5

the actual issue is it's not getting the params, but i'm not sure how to pass them to the public.
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)