24.04.2011, 14:09
LOL this is so funny,as if I want to drive I have to keep pressed button 2 also or the engine goes off(xDD);So what's worng?
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicleid=GetPlayerVehicleID(playerid);
SetVehicleParamsEx(vehicleid,0,0,0,0,0,0,0);
GameTextForPlayer(playerid,"Press 2 to turn engine on",2500,4);
if(PRESSED(KEY_SUBMISSION))
{
SetVehicleParamsEx(vehicleid,1,0,0,0,0,0,0);
SendClientMessage(playerid,BLUE,"The engine is turned on.");
}
}
return 1;
}