03.05.2016, 13:22
I was wondering how to create command that will execute on pressing button not typing /something. Understand me??
|
OnPlayerCommandText(playerid, command); |
|
OnPlayerCommandText(playerid, "/test"); |
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSING(KEY_YES))
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
return 1;
}
}
return 1;
}