Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Marko92 poslato Jun 11, 2010, 13:07:28 POSLE PODNE

Naslov: kupim kucu server se ugasi
Poruka od: Marko92 poslato Jun 11, 2010, 13:07:28 POSLE PODNE
evo kao sto naslov kaze. kupim kucu, a server mi se ugasi, tj. onaj crni prozorcic. nez zasto je tako. mi moze tko pomoc, ako zna??

unaprijed hvala
Naslov: Odg: kupim kucu server se ugasi
Poruka od: nastoe poslato Jun 11, 2010, 13:10:41 POSLE PODNE
To se zove crash, daj da vidimo komandu kojom kupujes kucu
Naslov: Odg: kupim kucu server se ugasi
Poruka od: Marko92 poslato Jun 11, 2010, 14:52:29 POSLE PODNE
if(strcmp(cmd, "/buyhouse", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         new Float:oldposx, Float:oldposy, Float:oldposz;
         GetPlayerName(playerid, playername, sizeof(playername));
         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
         for(new h = 0; h < sizeof(HouseInfo); h++)
         {
            if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
            {
               if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
               {
                  format(string, sizeof(string), "   You must be Level %d to purchase this !", HouseInfo[h][hLevel]);
                  SendClientMessage(playerid, COLOR_GRAD5, string);
                  return 1;
               }
               if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
               {
                  SendClientMessage(playerid, COLOR_WHITE, "   You already own a house, type /sellhouse if you want to buy this one !");
                  return 1;
               }
               if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
               {
                   Delete3DTextLabel(Text3D:housesale);
                  PlayerInfo[playerid][pPhousekey] = h;
                  HouseInfo[h][hOwned] = 1;
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
                  SafeGivePlayerMoney(playerid,-HouseInfo[h][hValue]);
                  PlayerPlayMusic(playerid);
                  /*SetPlayerInterior(playerid,HouseInfo[h][hInt]);
                  SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
                  SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);*/
                  GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
                  PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
                  PlayerInfo[playerid][pLocal] = h;
                  SendClientMessage(playerid, COLOR_WHITE, "Congratulations, on your new Purchase !");
                  SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section !");
                  Delete3DTextLabel(Text3D:housesale);
                        DateProp(playerid);
                  OnPropUpdate();
                  OnPlayerUpdate(playerid);
                  return 1;
               }
               else
               {
                  SendClientMessage(playerid, COLOR_WHITE, "   You don't have the cash for that !");
                  return 1;
               }
            }
         }
      }
      return 1;
   }




ali mi se to dogodi i kad kupim vozilo ili prodam kucu ili rentam vozilo, s bizzom ista stvar

i recite mi jos dali je moguce da imam dvije kuce s istim interijerom??
Naslov: Odg: kupim kucu server se ugasi
Poruka od: [AG] N1n0 poslato Jun 12, 2010, 12:29:21 POSLE PODNE
Citat: Marko92 poslato Jun 11, 2010, 14:52:29 POSLE PODNE
if(strcmp(cmd, "/buyhouse", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         new Float:oldposx, Float:oldposy, Float:oldposz;
         GetPlayerName(playerid, playername, sizeof(playername));
         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
         for(new h = 0; h < sizeof(HouseInfo); h++)
         {
            if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
            {
               if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
               {
                  format(string, sizeof(string), "   You must be Level %d to purchase this !", HouseInfo[h][hLevel]);
                  SendClientMessage(playerid, COLOR_GRAD5, string);
                  return 1;
               }
               if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
               {
                  SendClientMessage(playerid, COLOR_WHITE, "   You already own a house, type /sellhouse if you want to buy this one !");
                  return 1;
               }
               if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
               {
                   Delete3DTextLabel(Text3D:housesale);
                  PlayerInfo[playerid][pPhousekey] = h;
                  HouseInfo[h][hOwned] = 1;
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
                  SafeGivePlayerMoney(playerid,-HouseInfo[h][hValue]);
                  PlayerPlayMusic(playerid);
                  /*SetPlayerInterior(playerid,HouseInfo[h][hInt]);
                  SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
                  SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);*/
                  GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
                  PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
                  PlayerInfo[playerid][pLocal] = h;
                  SendClientMessage(playerid, COLOR_WHITE, "Congratulations, on your new Purchase !");
                  SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section !");
                  Delete3DTextLabel(Text3D:housesale);
                        DateProp(playerid);
                  OnPropUpdate();
                  OnPlayerUpdate(playerid);
                  return 1;
               }
               else
               {
                  SendClientMessage(playerid, COLOR_WHITE, "   You don't have the cash for that !");
                  return 1;
               }
            }
         }
      }
      return 1;
   }




ali mi se to dogodi i kad kupim vozilo ili prodam kucu ili rentam vozilo, s bizzom ista stvar

i recite mi jos dali je moguce da imam dvije kuce s istim interijerom??


za 1 problem:

Nemas neki fajl u scriptfiles

Udji u server_log i tamo bi trebalo da pise koju nemas

Dalije moguce imati dve kuce sa istim interiorom?:

DA, moguce je al ako su dva igraca u razlicitim kucama a isti interior, mogu se sresti!
Naslov: Odg: kupim kucu server se ugasi
Poruka od: Marko92 poslato Jun 12, 2010, 15:17:34 POSLE PODNE
a kako da popravim to da mi se server vise ne gasi kad kupim kucu ili auto ili rentam kucu ili auto?!
Naslov: Odg: kupim kucu server se ugasi
Poruka od: !GF!GeoO poslato Jun 12, 2010, 15:19:30 POSLE PODNE
odgovor ti je u njegovom postu!

za 1 problem:

Nemas neki fajl u scriptfiles

Udji u server_log i tamo bi trebalo da pise koju nemas
Naslov: Odg: kupim kucu server se ugasi
Poruka od: Marko92 poslato Jun 12, 2010, 15:27:16 POSLE PODNE
trazio sam tamo, ali ga ne mogu pronaci. ne pise tamo. a nzm sta je. HELP