[Ajuda] Ajuda Acho que nгo esta carregando casas/empresas
#9

Quote:
Originally Posted by Shadow Black
Посмотреть сообщение
Me mande o comando de comprar a casa.
ta ai у:

PHP код:
    if(strcmp(cmd"/comprarcasa"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
Float:oldposxFloat:oldposyFloat:oldposz;
            
GetPlayerName(playeridplayernamesizeof(playername));
            
GetPlayerPos(playeridoldposxoldposyoldposz);
            for(new 
0sizeof(HouseInfo); h++)
            {
                if(
PlayerToPoint(2.0playeridHouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
                {
                    if(
PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
                    {
                        
format(stringsizeof(string), "   Vocк precisa ter nivel %d Para comprar! !"HouseInfo[h][hLevel]);
                        
MSGPLAYER(playeridCOLOR_GRAD5string);
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pPHousekey] != 255 && strcmp(playernameHouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
                    {
                        
MSGPLAYER(playeridCOLOR_WHITE"   Vocк tem uma casa para vender digite /vendercasa, vocк receberб o mesmo valor que foi pago!");
                        return 
1;
                    }
                    if(
GetPlayerMoney(playerid) > HouseInfo[h][hValue])
                    {
                        
PlayerInfo[playerid][pPHousekey] = h;
                        
PlayerInfo[playerid][pPHouseCarkey] = PlayerInfo[playerid][pPHousekey]+totalveiculosh;
                        
HouseInfo[h][hOwned] = 1;
                        
HouseInfo[h][hExitx] = 234.0843;
                        
HouseInfo[h][hExity] = 1064.6896;
                        
HouseInfo[h][hExitz] = 1084.2108;
                        
HouseInfo[h][hInt] = 6;
                        
HouseInfo[h][hRentabil] = 1;
                        
HouseInfo[h][hRent] = 200;
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
strmid(HouseInfo[h][hOwner], sendername0strlen(sendername), 255);
                        
GivePlayerMoney(playerid,-HouseInfo[h][hValue]);
                        
PlayerPlayMusic(playerid);
                        
PlayerPlaySound(playerid10580.00.00.0);
                        
GameTextForPlayer(playerid"~w~Parabens pela compra ~n~~b~Para entrar digite /entrar"50003);
                        
MSGPLAYER(playeridCOLOR_WHITE"Parabйns pela sua nova casa!");
                        
MSGPLAYER(playeridCOLOR_WHITE"Digite /ajudacasa Em caso de duvidas!");
                        
PlayerInfo[playerid][pSpawn] = 1;
                        
DateProp(playerid);
                        
Atualizar3Dtexts();
                        
OnPropUpdate();
                        return 
1;
                    }
                    else
                    {
                        
MSGPLAYER(playeridCOLOR_WHITE"   Vocк nгo tem dinheiro o suficiente. !");
                        return 
1;
                    }
                }
            }
        }
        return 
1;
    }
    if(
strcmp(cmd"/alugarquarto"true) == || strcmp(cmd"/alugar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
Float:oldposxFloat:oldposyFloat:oldposz;
            
GetPlayerName(playeridplayernamesizeof(playername));
            
GetPlayerPos(playeridoldposxoldposyoldposz);
            for(new 
0sizeof(HouseInfo); h++)
            {
                if(
PlayerToPoint(2.0playeridHouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == &&  HouseInfo[h][hRentabil] == 1)
                {
                    if(
PlayerInfo[playerid][pPHousekey] != 255 && strcmp(playernameHouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
                    {
                        
MSGPLAYER(playeridCOLOR_WHITE"   Vocк tem uma casa, para vender digite /vendercasa, vocк receberб o mesmo valor que foi pago!");
                        return 
1;
                    }
                    if(
GetPlayerMoney(playerid) > HouseInfo[h][hRent])
                    {
                        
PlayerInfo[playerid][pPHousekey] = h;
                        
PlayerInfo[playerid][pPHouseCarkey] = PlayerInfo[playerid][pPHousekey]+totalveiculosh;
                        
GivePlayerMoney(playerid,-HouseInfo[h][hRent]);
                        
HouseInfo[h][hTakings] = HouseInfo[h][hTakings]+HouseInfo[h][hRent];
                        
PlayerPlayMusic(playerid);
                        
GameTextForPlayer(playerid"~w~Parabens pela compra ~n~~b~Para entrar digite /entrar"50003);
                        
MSGPLAYER(playeridCOLOR_WHITE"Parabйns pela sua nova casa!");
                        
MSGPLAYER(playeridCOLOR_WHITE"Digite /ajudaaluguel Em caso de duvidas!");
                        return 
1;
                    }
                    else
                    {
                        
MSGPLAYER(playeridCOLOR_WHITE"Vocк nгo tem dinheiro o suficiente.");
                        return 
1;
                    }
                }
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)