[Ayuda] Bank + Gangs + Properties + Bounty
#1

Hola gente!
Bueno, descarguй un FS que venia buscando hace tiempo, le hice algunas modificaciones a mi necesidad, pero tengo un problema que no puedo solucionar.
Cuando yo compro el Caligulas, y me voy del juego, cualquier jugador que entre serб el propietario del Caligulas :/.

Lo mismo pasaba con el banco, pero ya lo solucione. ("heredaba" la plata de otro jugador)
Pero con lo de las propiedades no puedo :/.

Les dejo todo el comando /comprar asi lo ven ustedes mismos...
pawn Код:
if(strcmp(cmd, "/comprar", true) == 0) {
        new property=999;

        if(IsPlayerInCheckpoint(playerid)) {
            switch (playerCheckpoint[playerid]) {
                case CP_ALAHAM:{
                    property = P_ALAHAM;
                }
                case CP_DIDERSACHS:{
                    property = P_DIDERSACHS;
                }
                case CP_BAR:{
                    property = P_BAR;
                }
                case CP_HAIRSTUD:{
                    property = P_HAIRSTUD;
                }
                case CP_ZIP:{
                    property = P_ZIP;
                }
                case CP_BINCO:{
                    property = P_BINCO;
                }
                case CP_TATOO:{
                    property = P_TATOO;
                }
                case CP_GOLF:{
                    property = P_GOLF;
                }
                case CP_WANG:{
                    property = P_WANG;
                }
                case CP_HOTEL:{
                    property = P_HOTEL;
                }
                case CP_OTTOS:{
                    property = P_OTTOS;
                }
                case CP_DRAGON:{
                    property = P_DRAGON;
                }
                case CP_CALIGULA:{
                    property = P_CALIGULA;
                }
                case CP_SEXSHOP:{
                    property = P_SEXSHOP;
                }
                case CP_CATHAY:{
                    property = P_CATHAY;
                }
                case CP_VERONA:{
                    property = P_VERONA;
                }
                case CP_ZERORC:{
                    property = P_ZERORC;
                }
                case CP_JIZZYS:{
                    property = P_JIZZYS;
                }
                case CP_PIRAMID:{
                    property = P_PIRAMID;
                }
            }

            if(property==999) {
                SendClientMessage(playerid, COLOR_YELLOW, "Necesitas estar en el checkpoint de la propiedad para comprarla!");
                return 1;
            }

//          property--;

            if(GetPlayerMoney(playerid) < propertyValues[property]) {
                SendClientMessage(playerid, COLOR_RED, "No tienes dinero suficiente para comprar esta propiedad.");
                return 1;
            }
            if(propertyOwner[property]==playerid) {
                SendClientMessage(playerid, COLOR_RED, "Eres dueсo de esta propiedad.");
                return 1;
            }

            if(propertyOwner[property] < 999) {
                GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                GivePlayerMoney(propertyOwner[property], propertyValues[property]);
                format (string, sizeof(string), "Tu propiedad, %s, fue comprada por %s (id: %d).",propertyNames[property],giveplayer,playerid);
                SendClientMessage(propertyOwner[property], COLOR_RED, string);
            }

            GivePlayerMoney(playerid, 0-propertyValues[property]);

            propertyOwner[property]=playerid;

            format(string, sizeof(string), "Compraste la propiedad %s!", propertyNames[property]);
            SendClientMessage(playerid, COLOR_GREEN, string);

        } else {
            SendClientMessage(playerid, COLOR_YELLOW, "Necesitas estar en el checkpoint de la propiedad para comprarla!");
            return 1;
        }


        return 1;
    }
Si necesitan algo mas, avisenme!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)