CMD ain't working -.-
#1

Well.. i've tried multiple times but it doesn't want to work..

PHP код:
 if(strcmp(cmd"/exit"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
              
GetPlayerName(playeridsendernamesizeof(sendername));
            for(new 
0sizeof(BizzInfo); i++)
            {
              if(
IsPlayerInRangeOfPointplayerid5.0BizzInfo[PlayerInfo[playerid][InBusiness]][bExitX], BizzInfo[PlayerInfo[playerid][InBusiness]][bExitY], BizzInfo[PlayerInfo[playerid][InBusiness]][bExitZ]))
            {
                if(
GetPlayerVirtualWorldplayerid ) > 0)
                 {
                    if(
PlayerInfo[playerid][InBusiness] != 0)
                      {
                        if(
PlayerInfo[playerid][pMask] == 1)
                        {
                            
format(stringsizeof(string), "* Stranger has left the business.");
                        }
                        else
                        {
                            
format(stringsizeof(string), "* %s has left the business."sendername);
                        }
                        if(
BizzInfo[PlayerInfo[playerid][InBusiness]][bType] == 3)
                        {
                            if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                            }
                            else if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                            }
                            else if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                            }
                            else if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_SMOKE_CIGGY);
                            }
                        }
                          else if(
BizzInfo[PlayerInfo[playerid][InBusiness]][bType] == 5)
                        {
                            if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                            }
                            else if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                            }
                            else if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                            }
                            else if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
                            {
                                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_SMOKE_CIGGY);
                            }
                        }
                        else if(
BizzInfo[PlayerInfo[playerid][InBusiness]][bType] == 7)
                        {
                            
TogglePlayerControllable(playerid1);
                            
SetPlayerArmour(playeridpKevlar[playerid]);
                            
SetPlayerHealth(playeridpHP[playerid]);
                        }
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                         
PlayerInfo[playerid][pVirtualWorld] = 0;
                        
SetPlayerVirtualWorldplayerid0);
                           
SetPlayerInteriorplayeridBizzInfo[PlayerInfo[playerid][InBusiness]][bExteriorID]);
                        
SetPlayerPosplayeridBizzInfo[PlayerInfo[playerid][InBusiness]][bEntranceX], BizzInfo[PlayerInfo[playerid][InBusiness]][bEntranceY], BizzInfo[PlayerInfo[playerid][InBusiness]][bEntranceZ]);
                        
PlayerInfo[playerid][InBusiness] = 0;
                        
StopAudioStreamForPlayer(playerid);
                     }
                  }
                else
                {
                     if(
PlayerInfo[playerid][pMask] == 1)
                    {
                        
format(stringsizeof(string), "* Stranger has left the business.");
                    }
                    else
                    {
                        
format(stringsizeof(string), "* %s has left the business."sendername);
                    }
                    
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                     
PlayerInfo[playerid][pVirtualWorld] = 0;
                       
SetPlayerVirtualWorldplayerid);
                       
SetPlayerInteriorplayeridBizzInfo[i][bExteriorID]);
                    
SetPlayerPosplayeridBizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
                 }
            }
        }
        for(new 
0sizeof(HouseInfo); i++)
        {
              if(
IsPlayerInRangeOfPoint(playerid3HouseInfo[PlayerInfo[playerid][InHouse]][hInteriorX], HouseInfo[PlayerInfo[playerid][InHouse]][hInteriorY], HouseInfo[PlayerInfo[playerid][InHouse]][hInteriorZ]))
              {
                if(
GetPlayerVirtualWorld(playerid) > 0)
                 {
                    if(
PlayerInfo[playerid][InHouse] != 0)
                      {
                        if(
PlayerInfo[playerid][pMask] == 1)
                        {
                            
format(stringsizeof(string), "* Stranger has left the house.");
                        }
                        else
                        {
                            
format(stringsizeof(string), "* %s has left the house."sendername);
                        }
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
PlayerInfo[playerid][pVirtualWorld] = 0;
                        
SetPlayerVirtualWorldplayerid);
                        
SetPlayerInteriorplayeridHouseInfo[PlayerInfo[playerid][InHouse]][hExteriorID]);
                           
SetPlayerPosplayeridHouseInfo[PlayerInfo[playerid][InHouse]][hExteriorX], HouseInfo[PlayerInfo[playerid][InHouse]][hExteriorY], HouseInfo[PlayerInfo[playerid][InHouse]][hExteriorZ]);
                           
PlayerInfo[playerid][InHouse] = 0;
                    }
                    else
                    {
                        if(
PlayerInfo[playerid][pMask] == 1)
                        {
                            
format(stringsizeof(string), "* Stranger has left the house.");
                        }
                        else
                        {
                            
format(stringsizeof(string), "* %s has left the house."sendername);
                        }
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                         
PlayerInfo[playerid][pVirtualWorld] = 0;
                        
SetPlayerVirtualWorld(playerid0);
                        
SetPlayerInterior(playeridHouseInfo[i][hExteriorID]);
                        
SetPlayerPos(playeridHouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]);
                    }
                    
StopAudioStreamForPlayer(playerid);
                    }
            }
            }
      for(new 
0sizeof(GarageInfo); i++)
        {
              if(
IsPlayerInRangeOfPoint(playerid3GarageInfo[PlayerInfo[playerid][InGarage]][gInteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gInteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gInteriorZ]))
              {
                if(
GetPlayerVirtualWorld(playerid) > 0)
                 {
                    if(
PlayerInfo[playerid][InGarage] != 0)
                      {
                        if(
PlayerInfo[playerid][pMask] == 1)
                        {
                            
format(stringsizeof(string), "* Stranger has left the Garage.");
                        }
                        else
                        {
                            
format(stringsizeof(string), "* %s has left the Garage."sendername);
                        }
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
PlayerInfo[playerid][pVirtualWorld] = 0;
                        if(
IsPlayerInAnyVehicle(playerid))
                        {
                            
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorZ]);
                            
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
                              
LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
                              
SetPlayerVirtualWorld(playerid0);
                            
SetPlayerInterior(playerid0);
                        }
                        else
                        {
                            
SetPlayerVirtualWorldplayerid);
                            
SetPlayerInteriorplayeridGarageInfo[PlayerInfo[playerid][InGarage]][gExteriorID]);
                               
SetPlayerPosplayeridGarageInfo[PlayerInfo[playerid][InGarage]][gExteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorZ]);
                        }
                        
PlayerInfo[playerid][InGarage] = 0;
                    }
                    else
                    {
                        if(
PlayerInfo[playerid][pMask] == 1)
                        {
                            
format(stringsizeof(string), "* Stranger has left the Garage.");
                        }
                        else
                        {
                            
format(stringsizeof(string), "* %s has left the Garage."sendername);
                        }
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                         
PlayerInfo[playerid][pVirtualWorld] = 0;
                         if(
IsPlayerInAnyVehicle(playerid))
                        {
                            
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorZ]);
                            
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
                              
LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
                              
SetPlayerVirtualWorld(playerid0);
                            
SetPlayerInterior(playerid0);
                        }
                        else
                        {
                            
SetPlayerVirtualWorld(playerid0);
                            
SetPlayerInterior(playerid0);
                            
SetPlayerPos(playeridGarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]);
                        }
                        
PlayerInfo[playerid][InGarage] = 0;
                    }
                    
StopAudioStreamForPlayer(playerid);
                    }
            }
            }
        for(new 
0sizeof(BInfo); i++)
        {
              if(
IsPlayerInRangeOfPoint(playerid3BInfo[PlayerInfo[playerid][Inbuilding]][bInteriorX], BInfo[PlayerInfo[playerid][Inbuilding]][bInteriorY], BInfo[i][bInteriorZ]))
            {
                   if(
GetPlayerInterior(playerid) == BInfo[PlayerInfo[playerid][Inbuilding]][bInteriorID] && GetPlayerVirtualWorld(playerid) >= 0)
                    {
                    if(
PlayerInfo[playerid][Inbuilding] != 0)
                    {
                        
PlayerInfo[playerid][pVirtualWorld] = 0;
                        
SetPlayerVirtualWorldplayerid);
                           
SetPlayerInteriorplayeridBInfo[PlayerInfo[playerid][Inbuilding]][bExteriorID]);
                          
SetPlayerPosplayeridBInfo[PlayerInfo[playerid][Inbuilding]][bExteriorX], BInfo[PlayerInfo[playerid][Inbuilding]][bExteriorY], BInfo[PlayerInfo[playerid][Inbuilding]][bExteriorZ]);
                        
PlayerInfo[playerid][Inbuilding] = 0;
                        
StopAudioStreamForPlayer(playerid);
                     }
                     else
                     {
                        
PlayerInfo[playerid][pVirtualWorld] = 0;
                         
SetPlayerVirtualWorld(playerid0);
                           
SetPlayerInterior(playeridBInfo[i][bExteriorID]);
                        
SetPlayerPos(playeridBInfo[i][bExteriorX], BInfo[i][bExteriorY], BInfo[i][bExteriorZ]);
                    }
                 }
             }
         }
        }
       }
        return 
1;
    } 
Dunno what's wrong - it compile fine but when i try it IG nothing happens
Reply
#2

Show the "/enter" cmd too.
Reply
#3

PHP код:
    if(strcmp(cmd"/enter"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
Float:shaxFloat:shayFloat:shaz;
            new 
Float:shbxFloat:shbyFloat:shbz;
            new 
Float:shcxFloat:shcyFloat:shcz;
            
GetVehiclePos(EnterableShamals[0], shaxshayshaz);
            
GetVehiclePos(EnterableShamals[1], shbxshbyshbz);
            
GetVehiclePos(EnterableShamals[2], shcxshcyshcz);
        for(new 
0sizeof(HouseInfo); i++)
        {
            if(
IsPlayerInRangeOfPoint(playerid3HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]))
             {
                if(
GetPlayerVirtualWorldplayerid) == 0)
                  {
                      if(
HouseInfo[i][hLocked] == || PlayerInfo[playerid][pScrew] >= 1)
                     {
                           if(
PlayerInfo[playerid][pMask] == 1)
                        {
                            
format(stringsizeof(string), "* Stranger has entered the house.");
                        }
                          else
                        {
                            
format(stringsizeof(string), "* %s has entered the house."sendername);
                        }
                          
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
PlayerInfo[playerid][InHouse] = i;
                           
SetPlayerInteriorplayeridHouseInfo[i][hInteriorID]);
                          
SetPlayerVirtualWorldplayeridHouseInfo[i][hVirWorld]);
                           
PlayerInfo[playerid][pVirtualWorld] = HouseInfo[i][hVirWorld];
                          
SetPlayerPosplayeridHouseInfo[i][hInteriorX], HouseInfo[i][hInteriorY], HouseInfo[i][hInteriorZ]);
                           if(
HouseInfo[i][hRadio] > && HouseInfo[i][hRadio] <= RADIOS)
                           {
                            new 
cRadio HouseInfo[i][hRadio];
                               switch(
cRadio)
                            {
                                case 
1:
                                {
                                    
StopAudioStreamForPlayer(playerid);
                                    
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
                                }
                                case 
2:
                                   {
                                       
StopAudioStreamForPlayer(playerid);
                                    
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1979774");
                                }
                                case 
3:
                                {
                                    
StopAudioStreamForPlayer(playerid);
                                    
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");
                                }
                            }
                        }
                          for(new 
0<MAX_PLAYERSx++)
                          {
                              new 
id PlayerInfo[x][pPhousekey];
                              if(
HouseInfo[id][hAlarmSystem] == && HouseInfo[id][hAlarmNumber] != && AlarmOnline[id] == 0)
                               {
                                   for(new 
0<MAX_PLAYERSa++)
                                {
                                       if(
IsPlayerConnected(a))
                                    {
                                        if(
PlayerInfo[playerid][pScrew] >= && HouseInfo[i][hLocked] == 1)
                                        {
                                               if(
PlayerInfo[a][pPnumber] == HouseInfo[id][hAlarmNumber])
                                            {
                                                new 
success random(4);
                                                 if(
success == 1)
                                                {
                                                    
format(stringsizeof(string), "House Alarm: Someone has tryed to enter inside the house but failed!");
                                                    
SendCopMessage(COLOR_DBLUE,string);
                                                    
PlayerInfo[playerid][pScrew] -= 1;
                                                    
SendClientMessage(playeridCOLOR_GREY"You failed to enter inside the house, run!");
                                                    
format(stringsizeof(string), "SMS: This is an automated message informing you that registrant %s's house alarm has been activated.",GetName(x));
                                                    
SendClientMessage(aCOLOR_YELLOWstring);
                                                    if(
IsACop(a))
                                                    {
                                                        
SetPlayerCheckpoint(playeridHouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ], 3.0);
                                                        
CP[a] = 46488;
                                                    }
                                                    if(
PlayerInfo[playerid][pWantedLevel] <= 6)
                                                    {
                                                        
PlayerInfo[playerid][pWantedLevel] += 1;
                                                        
SetPlayerWantedLevel(playeridPlayerInfo[playerid][pWantedLevel]);
                                                    }
                                                    
PlayerInfo[playerid][pVirtualWorld] = 0;
                                                    
SetPlayerVirtualWorld(playerid0);
                                                    
SetPlayerInterior(playeridHouseInfo[i][hExteriorID]);
                                                    
SetPlayerPos(playeridHouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]);
                                                }
                                                else
                                                {
                                                    
format(stringsizeof(string), "House Alarm: Someone has successfully entered inside the house!");
                                                    
SendCopMessage(COLOR_DBLUE,string);
                                                    
PlayerInfo[playerid][pScrew] -= 1;
                                                    if(
IsACop(a))
                                                    {
                                                        
SetPlayerCheckpoint(playeridHouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ], 3.0);
                                                        
CP[a] = 46488;
                                                    }
                                                    if(
PlayerInfo[playerid][pWantedLevel] <= 6)
                                                    {
                                                        
PlayerInfo[playerid][pWantedLevel] += 1;
                                                        
SetPlayerWantedLevel(playeridPlayerInfo[playerid][pWantedLevel]);
                                                    }
                                                    
SendClientMessage(playeridCOLOR_GREY"You successfully enter inside the house!");
                                                    
format(stringsizeof(string), "SMS: This is an automated message informing you that registrant %s's house alarm has been activated.",GetName(x));
                                                    
SendClientMessage(aCOLOR_YELLOWstring);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                          
GameTextForPlayer(playerid"~r~House is Locked!"10005);
                    }
                }
            }
        }
                                for(new 
0sizeof(GarageInfo); i++)
        {
            if(
IsPlayerInRangeOfPoint(playerid3GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]))
             {
                if(
GetPlayerVirtualWorldplayerid) == 0)
                  {
                      if(
GarageInfo[i][gLocked] == || PlayerInfo[playerid][pScrew] >= 1)
                     {
                           if(
PlayerInfo[playerid][pMask] == 1)
                        {
                            
format(stringsizeof(string), "* Stranger has entered the Garage.");
                        }
                          else
                        {
                            
format(stringsizeof(string), "* %s has entered the Garage."sendername);
                        }
                          
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
PlayerInfo[playerid][InGarage] = i;
                        if(
IsPlayerInAnyVehicle(playerid))
                        {
                              
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[i][gInteriorX], GarageInfo[i][gInteriorY], GarageInfo[i][gInteriorZ]);
                              
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GarageInfo[i][gVirWorld]);
                              
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GarageInfo[i][gInteriorID]);
                              
SetPlayerInteriorplayeridGarageInfo[i][gInteriorID]);
                              
SetPlayerVirtualWorldplayeridGarageInfo[i][gVirWorld]);
                        }
                        else
                        {
                               
PlayerInfo[playerid][pVirtualWorld] = GarageInfo[i][gVirWorld];
                              
SetPlayerPosplayeridGarageInfo[i][gInteriorX], GarageInfo[i][gInteriorY], GarageInfo[i][gInteriorZ]);
                              
SetPlayerInteriorplayeridGarageInfo[i][gInteriorID]);
                              
SetPlayerVirtualWorldplayeridGarageInfo[i][gVirWorld]);
                        }
                        
PlayerInfo[playerid][InGarage] = i;
                        if(
GarageInfo[i][gRadio] > && GarageInfo[i][gRadio] <= RADIOS)
                           {
                            new 
cRadio GarageInfo[i][gRadio];
                               switch(
cRadio)
                            {
                                case 
1:
                                {
                                    
StopAudioStreamForPlayer(playerid);
                                    
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
                                }
                                case 
2:
                                   {
                                       
StopAudioStreamForPlayer(playerid);
                                    
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1979774");
                                }
                                case 
3:
                                {
                                    
StopAudioStreamForPlayer(playerid);
                                    
PlayAudioStreamForPlayer(playerid"http://195.242.153.98:9026/listen.pls");
                                }
                            }
                        }
                          for(new 
0<MAX_PLAYERSx++)
                          {
                              new 
id PlayerInfo[x][pPhousekey];
                              if(
GarageInfo[id][gAlarmSystem] == && GarageInfo[id][gAlarmNumber] != && AlarmOnline[id] == 0)
                               {
                                   for(new 
0<MAX_PLAYERSa++)
                                {
                                       if(
IsPlayerConnected(a))
                                    {
                                        if(
PlayerInfo[playerid][pScrew] >= && GarageInfo[i][gLocked] == 1)
                                        {
                                               if(
PlayerInfo[a][pPnumber] == GarageInfo[id][gAlarmNumber])
                                            {
                                                new 
success random(4);
                                                 if(
success == 1)
                                                {
                                                    
format(stringsizeof(string), "Garage Alarm: Someone has tryed to enter inside the garage but failed!");
                                                    
SendCopMessage(COLOR_DBLUE,string);
                                                    
PlayerInfo[playerid][pScrew] -= 1;
                                                    
SendClientMessage(playeridCOLOR_GREY"You failed to enter inside the garage, run!");
                                                    
format(stringsizeof(string), "SMS: This is an automated message informing you that registrant %s's Garage Alarm has been activated.",GetName(x));
                                                    
SendClientMessage(aCOLOR_YELLOWstring);
                                                    if(
IsACop(a))
                                                    {
                                                        
SetPlayerCheckpoint(playeridGarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ], 3.0);
                                                        
CP[a] = 46488;
                                                    }
                                                    if(
PlayerInfo[playerid][pWantedLevel] <= 6)
                                                    {
                                                        
PlayerInfo[playerid][pWantedLevel] += 1;
                                                        
SetPlayerWantedLevel(playeridPlayerInfo[playerid][pWantedLevel]);
                                                    }
                                                    
PlayerInfo[playerid][pVirtualWorld] = 0;
                                                    
SetPlayerVirtualWorld(playerid0);
                                                    
SetPlayerInterior(playeridHouseInfo[i][hExteriorID]);
                                                    
SetPlayerPos(playeridGarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]);
                                                    
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]);
                                                }
                                                else
                                                {
                                                    
format(stringsizeof(string), "Garage Alarm: Someone has successfully entered inside the Garage!");
                                                    
SendCopMessage(COLOR_DBLUE,string);
                                                    
PlayerInfo[playerid][pScrew] -= 1;
                                                    if(
IsACop(a))
                                                    {
                                                        
SetPlayerCheckpoint(playeridGarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ], 3.0);
                                                        
CP[a] = 46488;
                                                    }
                                                    if(
PlayerInfo[playerid][pWantedLevel] <= 6)
                                                    {
                                                        
PlayerInfo[playerid][pWantedLevel] += 1;
                                                        
SetPlayerWantedLevel(playeridPlayerInfo[playerid][pWantedLevel]);
                                                    }
                                                    
SendClientMessage(playeridCOLOR_GREY"You successfully enter inside the Garage!");
                                                    
format(stringsizeof(string), "SMS: This is an automated message informing you that registrant %s's Garage alarm has been activated.",GetName(x));
                                                    
SendClientMessage(aCOLOR_YELLOWstring);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                          
GameTextForPlayer(playerid"~r~Garage is Locked!"10005);
                    }
                }
            }
        }
        for(new 
0sizeofBizzInfo ); i++)
        {
            if(
IsPlayerInRangeOfPointplayerid3BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
             {
                if(
GetPlayerVirtualWorldplayerid ) == 0)
                  {
                      if(
BizzInfo[i][bLocked] == 0)
                     {
                           if(
PlayerInfo[playerid][pCash] >= BizzInfo[i][bEntranceCost])
                          {
                               if(
PlayerInfo[playerid][pMask] == 1)
                            {
                                
format(stringsizeof(string), "* Stranger has entered the business.");
                            }
                            else
                            {
                                
format(stringsizeof(string), "* %s has entered the business."sendername);
                            }
                             
SetPlayerInteriorplayeridBizzInfo[i][bInteriorID]);
                              
SetPlayerPosplayeridBizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]);
                              
PlayerInfo[playerid][InBusiness] = i;
                              
SetPlayerVirtualWorldplayeridBizzInfo[i][bVirWorld]);
                               
PlayerInfo[playerid][pVirtualWorld] = BizzInfo[i][bVirWorld];
                               if(
BizzInfo[i][bRadio] != && BizzInfo[i][bRadio] != RADIOS+1)
                               {
                                new 
cRadio BizzInfo[i][bRadio];
                                   switch(
cRadio)
                                {
                                    case 
1:
                                    {
                                        
StopAudioStreamForPlayer(playerid);
                                        
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");
                                    }
                                    case 
2:
                                    {
                                        
StopAudioStreamForPlayer(playerid);
                                        
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1979774");
                                    }
                                    case 
3:
                                    {
                                        
StopAudioStreamForPlayer(playerid);
                                        
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
                                    }
                                }
                            }
                              if(
BizzInfo[i][bType] == 1)
                            {
                                
SendClientMessageplayeridCOLOR_YELLOW"You entered in a 24-7!");
                                
SendClientMessageplayeridCOLOR_WHITE"USAGE: /buy - /buykit" );
                            }
                            else if(
BizzInfo[i][bType] == 2)
                            {
                                
SendClientMessageplayeridCOLOR_YELLOW"You entered in a Clothes Store!");
                                
SendClientMessageplayeridCOLOR_WHITE"USAGE: /buy - /acessories" );
                            }
                            else if(
BizzInfo[i][bType] == 3)
                            {
                                
SendClientMessageplayeridCOLOR_YELLOW"You entered in a Club!");
                                
SendClientMessageplayeridCOLOR_WHITE"USAGE: /buy" );
                            }
                            else if(
BizzInfo[i][bType] == 4)
                            {
                                
SendClientMessageplayeridCOLOR_YELLOW"You entered in an Ammunation!");
                                
SendClientMessageplayeridCOLOR_WHITE"USAGE: /buy" );
                            }
                            else if(
BizzInfo[i][bType] == 5)
                            {
                                
SendClientMessageplayeridCOLOR_YELLOW"You entered in a Casino!");
                                
SendClientMessageplayeridCOLOR_WHITE"USAGE: /bet & /buy");
                            }
                            else if(
BizzInfo[i][bType] == 6)
                            {
                                
SendClientMessageplayeridCOLOR_YELLOW"You entered in a Restaurant!");
                                
SendClientMessageplayeridCOLOR_WHITE"USAGE: /buy" );
                            }
                            else if(
BizzInfo[i][bType] == 7)
                            {
                                
GetPlayerArmour(playeridpKevlar[playerid]);
                                
GetPlayerHealth(playeridpHP[playerid]);
                                
SendClientMessage(playeridCOLOR_YELLOW"You entered in a Paintball Weapon Shop!");
                                
PlayerPlaySound(playerid10570.00.00.0);
                                
SendClientMessage(playeridCOLOR_LIGHTRED"You can now buy your weapons!");
                                
SendClientMessage(playeridCOLOR_WHITE"USAGE: /buy");
                            }
                            else if(
BizzInfo[i][bType] == 8)
                            {
                                
SendClientMessage(playeridCOLOR_YELLOW"You entered in a Bank!");
                                
SendClientMessage(playeridCOLOR_WHITE"USAGE: /bankpercent, /wiretransfer, /deposit & /withdraw" );
                            }
                            else if(
BizzInfo[i][bType] == 9)
                            {
                                
SendClientMessage(playeridCOLOR_YELLOW"You entered in an Electronic Store!");
                                
SendClientMessage(playeridCOLOR_WHITE"USAGE: /buy" );
                            }
                               else if(
BizzInfo[i][bType] == 10)
                            {
                                
SendClientMessage(playeridCOLOR_YELLOW"You entered in a Locks Store!");
                                
SendClientMessage(playeridCOLOR_WHITE"USAGE: /buylock" );
                            }
                            else if(
BizzInfo[i][bType] == 11)
                            {
                                
SendClientMessage(playeridCOLOR_YELLOW"You entered in a Radio shop!");
                                
SendClientMessage(playeridCOLOR_WHITE"USAGE: /buy");
                            }
                            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                             
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
                             
GivePlayerMoney(playerid, -BizzInfo[i][bEntranceCost]);
                              
PlayerInfo[playerid][pCash] -= BizzInfo[i][bEntranceCost];
                            
ExtortionBiz(iBizzInfo[i][bEntranceCost]);
                         }
                          else
                         {
                            
SendClientMessage(playeridCOLOR_GREY"   You don't have enough money to enter!");
                           }
                       }
                    else
                    {
                        
GameTextForPlayer(playerid"~r~Business is Locked!"10005);
                }
            }
        }
       }
                for(new 
0sizeof(BInfo); i++)
        {
            if(
IsPlayerInRangeOfPoint(playerid3BInfo[i][bExteriorX], BInfo[i][bExteriorY], BInfo[i][bExteriorZ]))
             {
                if(
GetPlayerInterior(playerid) == BInfo[i][bExteriorID] && GetPlayerVirtualWorld(playerid) == 0)
                {
                    if(
BInfo[i][bVIP] != || PlayerInfo[playerid][pDonateRank] != 0)
                    {
                        if(
BInfo[i][bLocked] == 0)
                        {
                            
PlayerInfo[playerid][Inbuilding] = i;
                            
SetPlayerInteriorplayeridBInfo[i][bInteriorID]);
                            
SetPlayerVirtualWorldplayeridBInfo[i][bVirWorld]);
                            
PlayerInfo[playerid][pVirtualWorld] = BInfo[i][bVirWorld];
                            
Pause(playerid);
                            
SetPlayerPos(playeridBInfo[i][bInteriorX], BInfo[i][bInteriorY], BInfo[i][bInteriorZ]);
                            if(
BInfo[i][buRadio] >= && strlen(BInfo[i][buRadioURL]))
                            {
                                
StopAudioStreamForPlayer(playerid);
                                
PlayAudioStreamForPlayer(playeridBInfo[i][buRadioURL]);
                            }
                           }
                         else
                          {
                            
GameTextForPlayer(playerid"~r~Building is Locked!"10005);
                           }
                    }
                    else
                    {
                         
SendClientMessage(playeridCOLOR_GREY"   You are not a VIP!");
                    }
                }
            }
        } 
Note : the /enter is working fine tho..
Reply
#4

At the begining of command use SendClientMessage(playerid, 0xFFFFFFFF, "0"); then small piece of code, then SCM(..., "1"); then another piece of code then SCM(..., "2"); and so on to see where it gets and where it stops.
Reply
#5

Quote:
Originally Posted by Luk_Ass
Посмотреть сообщение
At the begining of command use SendClientMessage(playerid, 0xFFFFFFFF, "0"); then small piece of code, then SCM(..., "1"); then another piece of code then SCM(..., "2"); and so on to see where it gets and where it stops.
Yes, this wiki page may help too:

https://sampwiki.blast.hk/wiki/Debugging
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)