Returning a command in OnPlayerKeyStateChange
#1

Basically, I'm using Zcmd and sscanf to code commands, but in OnPlayerKeyStateChange "params" isn't defined so the following code doesn't work as expected.

How can I return the use of a command in OnPlayerKeyStateChange?

Here's my code:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_YES))
    {
        return cmd_vinteract(playerid, params);
    }
    if(GetPlayerState(playerid) == 2 || GetPlayerState(playerid) == 3)
    {
        if(GetPlayerVehicleSeat(playerid) == 0 || GetPlayerVehicleSeat(playerid) == 1)
        {
            if(PRESSED(KEY_SPRINT))
            {
                new vehid;
                vehid = GetPlayerVehicleID(playerid);
                if(vengineon[playerid] == 0)
                {
                    return cmd_eon(playerid, params);
                }
            }
            if(PRESSED(KEY_SUBMISSION))
            {
                //
            }
        }
    }
    if(PRESSED(128))
    {
        //
    }
    return 1;
}
Reply


Messages In This Thread
Returning a command in OnPlayerKeyStateChange - by vIBIENNYx - 01.10.2012, 16:21
Re: Returning a command in OnPlayerKeyStateChange - by Danyal - 01.10.2012, 16:43
Re: Returning a command in OnPlayerKeyStateChange - by Smally - 01.10.2012, 16:45
Re: Returning a command in OnPlayerKeyStateChange - by ViniBorn - 01.10.2012, 16:48
Re: Returning a command in OnPlayerKeyStateChange - by vIBIENNYx - 01.10.2012, 17:11
Re: Returning a command in OnPlayerKeyStateChange - by Smally - 01.10.2012, 17:18
Re: Returning a command in OnPlayerKeyStateChange - by vIBIENNYx - 01.10.2012, 17:56

Forum Jump:


Users browsing this thread: 1 Guest(s)