10.10.2011, 15:59
i got a problem with my car lights,
they don't shine..
it doesn't turn on the lights of my vehicle but it does send the message..
the strange thing is, when i leave my vehicle the lights are one, when i enter they're off.. XD
they don't shine..
pawn Код:
CMD:lights(playerid, params[]) {
if(IsPlayerInAnyVehicle(playerid)) {
new engine, lights, alarm, doors, bonnet, boot, objective, vid;
vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
if(lights == 0) {
SetVehicleParamsEx(vid, engine, 1, alarm, doors, bonnet, boot, objective);
new message[240], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(message, sizeof(message), "*** %s turns on the lights of the %s ***", pname, vname(vid));
ProxDetector(30.0, playerid, message, COLOR_LIGHTRED);
} else {
SetVehicleParamsEx(vid, engine, 0, alarm, doors, bonnet, boot, objective);
new message[240], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(message, sizeof(message), "*** %s turns off the lights of the %s ***", pname, vname(vid));
ProxDetector(30.0, playerid, message, COLOR_LIGHTRED);
}
}
return 1;
}
the strange thing is, when i leave my vehicle the lights are one, when i enter they're off.. XD