Szerző Téma: Világítás  (Megtekintve 676 alkalommal)

Világítás
« Dátum: 2014. Június 04. - 17:06:51 »
0 Show voters
Sziasztok, Valaki nemtudna nekem ebbõl gyártani egy FS-t? vagy esetleg egy ilyen FS-t adni? arra lenne szükségem hogy napközben is világítson a lámpa kocsin (világítás) Ezt a kódót (pawn) egy gamemode-ban találtam, ebbõl kéne csinálni egy FS-t hálás lennék aki megcsinálná nekem!! :) Köszönöm!!
 
//================================================================================================================================
if(strcmp(cmd, \"/lights\", true) == 0)
{
        new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"You must be in a car before you can do this!\");
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_GRAD2, \"Only the driver can do this!\");
if(lights == VEHICLE_PARAMS_OFF || lights == VEHICLE_PARAMS_UNSET)
        {
            GameTextForPlayer(playerid, \"~g~Lights on\", 5000, 4);
            SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Lights turned \"#COL_GREEN\"on\");
   GetPlayerName(playerid, sendername, sizeof(sendername));
   format(string, sizeof(string), \"* %s presses the light button and turns them on.\", sendername);
   ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
        }
        if(lights == VEHICLE_PARAMS_ON)
{
            GameTextForPlayer(playerid, \"~R~Lights off\", 5000, 4);
            SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Lights turned \"#COL_RED\"Off\");
   GetPlayerName(playerid, sendername, sizeof(sendername));
   format(string, sizeof(string), \"* %s presses the light button and turns them off.\", sendername);
   ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
        }
return 1;
    }
« Utoljára szerkesztve: 2014. Június 04. - 17:19:08 írta Flash »

Világítás
« Válasz #1 Dátum: 2014. Június 08. - 14:34:49 »
0 Show voters
Megoldva! Csak ez kellet hozzá! ManualVehicleEngineAndLights();

Világítás
« Válasz #2 Dátum: 2014. Június 04. - 17:06:51 »
0 Show voters
Sziasztok, Valaki nemtudna nekem ebbõl gyártani egy FS-t? vagy esetleg egy ilyen FS-t adni? arra lenne szükségem hogy napközben is világítson a lámpa kocsin (világítás) Ezt a kódót (pawn) egy gamemode-ban találtam, ebbõl kéne csinálni egy FS-t hálás lennék aki megcsinálná nekem!! :) Köszönöm!!
 
//================================================================================================================================
if(strcmp(cmd, \"/lights\", true) == 0)
{
        new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"You must be in a car before you can do this!\");
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_GRAD2, \"Only the driver can do this!\");
if(lights == VEHICLE_PARAMS_OFF || lights == VEHICLE_PARAMS_UNSET)
        {
            GameTextForPlayer(playerid, \"~g~Lights on\", 5000, 4);
            SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Lights turned \"#COL_GREEN\"on\");
   GetPlayerName(playerid, sendername, sizeof(sendername));
   format(string, sizeof(string), \"* %s presses the light button and turns them on.\", sendername);
   ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
        }
        if(lights == VEHICLE_PARAMS_ON)
{
            GameTextForPlayer(playerid, \"~R~Lights off\", 5000, 4);
            SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Lights turned \"#COL_RED\"Off\");
   GetPlayerName(playerid, sendername, sizeof(sendername));
   format(string, sizeof(string), \"* %s presses the light button and turns them off.\", sendername);
   ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
        }
return 1;
    }
« Utoljára szerkesztve: 2014. Június 04. - 17:19:08 írta Flash »

Világítás
« Válasz #3 Dátum: 2014. Június 08. - 14:34:49 »
0 Show voters
Megoldva! Csak ez kellet hozzá! ManualVehicleEngineAndLights();

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal