01.10.2012, 16:21
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:
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;
}