27.07.2011, 22:06
pawn Код:
new vid, engine, lights, alarm, doors, bonnet, boot, objective;
vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
switch(engine)
{
case 0: { SetVehicleParamsEx(vid, 1, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid, 0x00FF00FF, "Engine turned on!"); }
case 1: { SetVehicleParamsEx(vid, 0, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid, 0xFF0000FF, "Engine turned off!"); }
}
//Note that 0 - off 1 - on.