Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Luka. poslato Februar 07, 2015, 15:10:06 POSLE PODNE

Naslov: [Pomoc] Kuce
Poruka od: Luka. poslato Februar 07, 2015, 15:10:06 POSLE PODNE
Skripta koju koristim://
Detaljan opis problema:Znaci ja kupim kucu ono zakljucam je odem relog i ponovno ocu da otkljucam i pise da nemam kucu i tako za sve komande, a ingame na kod kuce pise da sam ja vlasnik
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Naslov: Odg: [Pomoc] Kuce
Poruka od: // xunder poslato Februar 07, 2015, 15:12:14 POSLE PODNE
Mozda imas BUG u cuvanju koji mod koristis?
Naslov: Odg: [Pomoc] Kuce
Poruka od: Luka. poslato Februar 07, 2015, 15:22:24 POSLE PODNE
united gaming
Naslov: Odg: [Pomoc] Kuce
Poruka od: ▂ ▃ ▅ Rudimental ▅ ▃ ▂ poslato Februar 07, 2015, 16:09:04 POSLE PODNE
Proveri ti dali kada kupis kucu i odes relog dali u fajlu ti sacuvao varijablu za kljuc kuce ako nije onda to sredis i nemas problema.
Naslov: Odg: [Pomoc] Kuce
Poruka od: [JV:RP] Milos poslato Februar 07, 2015, 16:13:27 POSLE PODNE
Daj komandu zakljucavanja kuce i otkljucanja cijelu komdanu....
Naslov: Odg: [Pomoc] Kuce
Poruka od: Luka. poslato Februar 08, 2015, 08:28:51 PRE PODNE
if(strcmp(cmd, "/lockhouse", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           new house = PlayerInfo[playerid][pHouseKey];
           new house_2 = PlayerInfo[playerid][pHouseKey2];
           new house_3 = PlayerInfo[playerid][pHouseKey3];
           new house_4 = PlayerInfo[playerid][pHouseKey4];
           if(house == -1 && house_2 == -1 && house_3 == -1 && house_4 == -1)
         {
            SendClientMessage(playerid, GREY, "    You don't own a house.");
            return 1;
         }
         tmp = strtok(cmdtext, idx);
         if (!strlen(tmp)) return SyntaxMessage(playerid, "/lockhouse [1-2-3-4]");
         new slot = strval(tmp);
         if (slot < 1 || slot > 4) return SendClientMessage(playerid, GREY, "Slot can't be below 1, or above 4.");
         if (slot == 1)
         {
             if (PlayerInfo[playerid][pHouseKey] == -1) return SendClientMessage(playerid, GREY, "    You don't own a house in that slot.");
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house][HouseEnterX], HouseInfo[house][HouseEnterY], HouseInfo[house][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house][HouseInsideX], HouseInfo[house][HouseInsideY], HouseInfo[house][HouseInsideZ]))
            {
                SendClientMessage(playerid, GREY, "    You are not near/inside your house.");
               return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(HouseInfo[house][HouseLock] == 1)
            {
                HouseInfo[house][HouseLock] = 0;
                PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
            else
            {
               HouseInfo[house][HouseLock] = 1;
               PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
               format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
         }
         if (slot == 2)
         {
             if (PlayerInfo[playerid][pHouseKey2] == -1) return SendClientMessage(playerid, GREY, "    You don't own a house in that slot.");
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house_2][HouseEnterX], HouseInfo[house_2][HouseEnterY], HouseInfo[house_2][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house_2][HouseInsideX], HouseInfo[house_2][HouseInsideY], HouseInfo[house_2][HouseInsideZ]))
            {
                SendClientMessage(playerid, GREY, "    You are not near/inside your house.");
               return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(HouseInfo[house_2][HouseLock] == 1)
            {
                HouseInfo[house_2][HouseLock] = 0;
                PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
            else
            {
               HouseInfo[house_2][HouseLock] = 1;
               PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
               format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
         }
         if (slot == 3)
         {
             if (PlayerInfo[playerid][pHouseKey3] == -1) return SendClientMessage(playerid, GREY, "    You don't own a house in that slot.");
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house_3][HouseEnterX], HouseInfo[house_3][HouseEnterY], HouseInfo[house_3][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house_3][HouseInsideX], HouseInfo[house_3][HouseInsideY], HouseInfo[house_3][HouseInsideZ]))
            {
                SendClientMessage(playerid, GREY, "    You are not near/inside your house.");
               return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(HouseInfo[house_3][HouseLock] == 1)
            {
                HouseInfo[house_3][HouseLock] = 0;
                PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
            else
            {
               HouseInfo[house_3][HouseLock] = 1;
               PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
               format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
         }
         if (slot == 4)
         {
             if (PlayerInfo[playerid][pHouseKey4] == -1) return SendClientMessage(playerid, GREY, "    You don't own a house in that slot.");
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house_4][HouseEnterX], HouseInfo[house_4][HouseEnterY], HouseInfo[house_4][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house_4][HouseInsideX], HouseInfo[house_4][HouseInsideY], HouseInfo[house_4][HouseInsideZ]))
            {
                SendClientMessage(playerid, GREY, "    You are not near/inside your house.");
               return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(HouseInfo[house_4][HouseLock] == 1)
            {
                HouseInfo[house_4][HouseLock] = 0;
                PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
            else
            {
               HouseInfo[house_4][HouseLock] = 1;
               PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
               format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
               ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
               return 1;
            }
         }
       }
       return 1;
   }

tako je za sve komande vezano za kucu nece nista
Naslov: Odg: [Pomoc] Kuce
Poruka od: ▂ ▃ ▅ Rudimental ▅ ▃ ▂ poslato Februar 08, 2015, 15:11:43 POSLE PODNE
Kodove iz scripte stavljaj u [ code ] Text [ /code ] (Samo spoj zagrade) i reci mi jesi proverio ono sto sam ti rekao ?