[Ajuda] Alguem ajuda rapido
#1

Nгo sei oq faze realmente, kkkkk nunca tive q faze nada igual a isso, alguem me ajuda ai

Tipo existe o "tipo:" para editar o tipo de casa ou descricao... mas eu queria por essa descriзгo de vip... o /descricao e eu consegui "VIP"

agora eu queria sabe no /comprarcasa como eu coloco isso ai se o player й vip(3 niveis de vip 1,2,3) consegue comprar a casa com a descriзгo vip...

tentei faze isso mas n foi

Parte do /comprarcasa
PHP код:
                    if(PlayerInfo[playerid][pVIP] != HouseInfo[h][hDiscription] = 1)
                    {
                        
SendClientMessage(playeridCOLOR_WHITE"Vocк nгo tem vip para comprar essa casa");
                        return 
1;
                    } 
Nгo tenho ideia de como fazer...

Pff me ajudem aiii...


*** pra ti ve q eu to tгo perdido eu fiz um negocio q nem existe q й aqla linha alieee
Reply
#2

passa o code comprar casa
Reply
#3

PHP код:
    if(strcmp(cmd"/comprarcasa"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
Float:oldposxFloat:oldposyFloat:oldposz;
            new 
curdate getdate();
            
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]);
                        
SendClientMessage(playeridCOLOR_GRAD5string);
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pPHousekey] != 255 && strcmp(playernameHouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
                    {
                        
SendClientMessage(playeridCOLOR_WHITE"   Vocк tem uma casa para vender digite /vendercasa, vocк receberб o mesmo valor que foi pago!");
                        return 
1;
                    }
                    if(
GetGranaRockstar(playerid) > HouseInfo[h][hValue])
                    {
                        
PlayerInfo[playerid][pPHousekey] = h;
                        
PlayerInfo[playerid][pPHouseCarkey] = PlayerInfo[playerid][pPHousekey]+1;
                        
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);
                        
HouseInfo[h][hDate] = curdate;
                        
GranaRockstar(playerid,-HouseInfo[h][hValue]);
                        
/*PlayerPlayMusic(playerid);
                        PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);*/
                        
GameTextForPlayer(playerid"~w~Parabens pela compra ~n~~b~Para entrar digite /entrar"50003);
                        
SendClientMessage(playeridCOLOR_WHITE"Parabйns pela sua nova casa!");
                        
SendClientMessage(playeridCOLOR_WHITE"Digite /ajudacasa Em caso de duvidas!");
                        
PlayerInfo[playerid][pSpawn] = 1;
                        
Text3DRockstar();
                        
OnPropUpdate();
                        
SalvarPlayer(playerid);
                        return 
1;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_WHITE"   Vocк nгo tem dinheiro o suficiente. !");
                        return 
1;
                    }
                }
            }
        }
        return 
1;
    } 
Reply
#4

Apenas coloque isto no topo do comando:


PHP код:
if(!strcmp(cmdtext"/meucomando"true)){
    if(
PlayerInfo[playerid][pVIP] != HouseInfo[h][hDiscription] = 1
    { 
        
SendClientMessage(playeridCOLOR_WHITE"Vocк nгo tem vip para comprar essa casa"); 
        return 
1
    }  

    
//
    // Caso for vip ele executa os comandos..
    //
    
return 1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)