Whats wrong?
#1

Whats wrong with this this is a command for lights
It is not working on the server :S
pawn Код:
//------------------------------------------------------------------------------
    if(strcmp(cmd,"/svetla", true) == 0)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
      if(IsPlayerConnected(playerid))
      {
        if(Svetla[playerid] == 0)
        {
            GetPlayerNameEx(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "%s gi pusti svetlata.", sendername);
            ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            SendClientMessage(playerid, WHITE, "{37F906}INFO:{FFFFFF}Gi pustivte svetlata.");
            GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,1,alarm,doors,bonnet,boot,objective);
            Svetla[playerid] = 1;
            return 1;
        }
        else
        {
          GetPlayerNameEx(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "%s gi iskluci svetlata.", sendername);
          ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
          SendClientMessage(playerid, WHITE, "{37F906}INFO:{FFFFFF}Gi izklucivte svetlata.");
          GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
          SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,0,alarm,doors,bonnet,boot,objective);
          Svetla[playerid] = 0;
          return 1;
        }
      }
     }
     return 1;
    }
I have
pawn Код:
new Svetla[MAX_PLAYERS];
Reply


Messages In This Thread
Whats wrong? - by Vizi - 01.08.2012, 20:01
Re: Whats wrong? - by Vizi - 01.08.2012, 20:16
Re: Whats wrong? - by Vizi - 01.08.2012, 20:30
Re: Whats wrong? - by Misiur - 01.08.2012, 20:37
Re: Whats wrong? - by Vizi - 01.08.2012, 20:39
Re: Whats wrong? - by Misiur - 01.08.2012, 20:48
Re: Whats wrong? - by Vizi - 01.08.2012, 20:52
Re: Whats wrong? - by Vizi - 02.08.2012, 07:27
Re: Whats wrong? - by Misiur - 02.08.2012, 08:43
Re: Whats wrong? - by [MM]RoXoR[FS] - 02.08.2012, 09:57

Forum Jump:


Users browsing this thread: 1 Guest(s)