[pomoc]Svjetla

Započeo [TVG] Brla, Maj 11, 2014, 14:00:26 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Scripta koju koristim: Moja
Prebacio sa scripte: UP
Problem: Znaci Otvori mi gepek, otvori haubu, ali alarm i svjetla nerade moze pomoc
#define VKONTROLA            19923
#define VMOTOR            19924
#define VSVJETLA            19925
#define VHAUBA            19926
#define VGEPEK            19927
#define VALARM            19928


new lokic[MAX_VEHICLES];

new avto = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
    if(dialogid == VALARM)
    {
    if(!response)
    {
    lokic[avto] = 0;
    SCM(playerid, -1, "{FFFF00}Ugasili ste alarm.");
    }
    if(response)
    {
    lokic[avto] = 1;
    SCM(playerid, -1, "{FFFF00}Upalili ste alarm.");
    }
    }
    if(dialogid == VGEPEK)
    {
    if(!response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    }
    if(response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
    }
    }
    if(dialogid == VHAUBA)
    {
    if(!response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    }
    if(response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
    }
    }
    if(dialogid == VSVJETLA)
    {
    if(!response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    }
    if(response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
    }
    }
    if(dialogid == VMOTOR)
    {
    if(!response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    }
    if(response)
    {
    GetVehicleParamsEx(avto,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(avto,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    }
    }
    if(dialogid == VKONTROLA)
    {
    if(response)
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,VMOTOR,DIALOG_STYLE_MSGBOX,"{B39E4D}Motor","Odaberite sta zelite da radite sa vasim motorom.","Upali","Ugasi");
    }
    if(listitem == 1)
    {
    ShowPlayerDialog(playerid,VSVJETLA,DIALOG_STYLE_MSGBOX,"{B39E4D}Svjetla","Odaberite sta zelite da radite sa vasim svjetlima.","Upali","Ugasi");
    }
    if(listitem == 2)
    {
    ShowPlayerDialog(playerid,VHAUBA,DIALOG_STYLE_MSGBOX,"{B39E4D}Hauba","Odaberite sta zelite da radite sa vasom haubom.","Otvori","Zatvori");
    }
    if(listitem == 3)
    {
    ShowPlayerDialog(playerid,VGEPEK,DIALOG_STYLE_MSGBOX,"{B39E4D}Gepek","Odaberite sta zelite da radite sa vasim gepekom.","Otvori","Zatvori");
    }
    if(listitem == 4)
    {
    ShowPlayerDialog(playerid,VGEPEK,DIALOG_STYLE_MSGBOX,"{B39E4D}Alarm","Odaberite sta zelite da radite sa vasim alarmom.","Upali","Ugasi");
    }
    }
    }[/pawn]

[pawn]CMD:vkontrola(playerid, params[])
{
//#pragma unused params
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,""SIVA"Niste u vozilu!");
{
ShowPlayerDialog(playerid,VKONTROLA,DIALOG_STYLE_LIST,"{B39E4D}Vozilo","Motor\nSvjetla\nHauba\nGepek\nAlarm","Izaberi","Izadji");
}
return 1;
}


if(lokic[vehicleid] == 1)
        {
        new engine,lights,alarm,doors,bonnet,boot,objective;
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
        }
Poslednja Izmena: Maj 11, 2014, 14:02:18 POSLE PODNE od dariobrlic