29.01.2015, 14:30
pawn Код:
CMD:en(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0)
{
SetVehicleParamsEx(vehicleid,1,lights,alarm,doors,bonnet,boot,objective);
new str[128];
format(str, sizeof(str), "* %s twists the key in the ignition, turning the engine [ON]. *", GetName(playerid));
SendRangeMessage(playerid, COLOR_DO, str, 15);
return 1;
}
else if(engine == 1)
{
SetVehicleParamsEx(vehicleid,0,lights,alarm,doors,bonnet,boot,objective);
new str[128];
format(str, sizeof(str), "* %s twists the key in the ignition, turning the engine [OFF]. *", GetName(playerid));
SendRangeMessage(playerid, COLOR_DO, str, 15);
return 1;
}
}
return 1;
}