[Comandos no aHouse]
#4

pawn Код:
if (strcmp(cmd, "/corcarrocasa", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new house = PlayerInfo[playerid][pPhousekey];
            GetPlayerName(playerid, playername, sizeof(playername));
            if (house != 255)
            {
                if(strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) != 0 && strcmp(PlayerInfo[playerid][pMarriedTo], HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) != 0)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "[Info] Vocк nгo tem uma casa !");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD3,"(R$5000) USO: /corcarrocasa [color 1 - 2] [color number]");
                    return 1;
                }
                new colornum = strval(tmp);
                if(colornum > 2 || colornum < 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD3,"Escolha entre cor primбria (1) e cor secundбria (2)");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD3,"(R$5000) USO: /corcarrocasa [color 1 - 2] [color number]");
                }
                new color = strval(tmp);
                if(color > 126)
                {
                    SendClientMessage(playerid, COLOR_GRAD3,"Mбxima cor 126");
                    return 1;
                }
                if (GetPlayerGP(playerid) < 300)
                {
                    SendClientMessage(playerid, COLOR_GRAD3,"[Info] Vocк nгo pode pagar isto (R$300)");
                }
                if(colornum == 1)
                {
                    HouseInfo[house][hVcol1] = color;
                    format(string, sizeof(string), "Cor primбria do veнculo mudada para %d (R$-300)",color);
                    SendClientMessage(playerid, COLOR_GRAD3,string);
                }
                else
                {
                    HouseInfo[house][hVcol2] = color;
                    format(string, sizeof(string), "Cor secundбria do veнculo mudada para %d (R$-300)",color);
                    SendClientMessage(playerid, COLOR_GRAD3,string);
                }
                SendClientMessage(playerid, COLOR_GRAD6, "Sua pintura nova irб se completar ao passar de uma hora.");
                GivePlayerGP(playerid,-300);
                SBizzInfo[5][sbTill] += 300;
                ExtortionSBiz(5, 300);
                PlayerPlaySound(giveplayerid, 1134, 0.0, 0.0, 0.0);
                OnPropUpdate();
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "   Vocк nгo tem uma Casa.");
                return 1;
            }
        }
        return 1;
    }
Tenta isso
Reply


Messages In This Thread
[Comandos no aHouse] - by Link_ - 05.12.2010, 13:13
Re: [Comandos no aHouse] - by [Ips]Guh - 05.12.2010, 13:33
Re: [Comandos no aHouse] - by Link_ - 05.12.2010, 15:01
Re: [Comandos no aHouse] - by Andre_Elite - 06.12.2010, 08:18

Forum Jump:


Users browsing this thread: 1 Guest(s)