[Pomoc] /prodajfirmu

Započeo ...Nikola..., Januar 05, 2012, 21:11:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Cyber Edit
Detaljan opis problema: Kupim firmu pa kad prodam i kad probam da opet kupim pise da posedujem firmu i kad odem relog opet pise da je posedujem kako da popravim ?
Dio skripte:
if(strcmp(cmd, "/prodajfirmu", true) == 0)
{
     if(IsPlayerConnected(playerid))
  {
   GetPlayerName(playerid, playername, sizeof(playername));
   if(PlayerInfo[playerid][pPbiskey] == 255)
   {
    SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujete biznis.");
    return 1;
   }
   if(PlayerInfo[playerid][pMarried] > 0)
   {
    SendClientMessage(playerid, COLOR_GREY, "   Vjencani ste, ne mozete prodati biznis !");
    return 1;
   }
   if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
   {
    new bouse = PlayerInfo[playerid][pPbiskey]-100;
    GivePlayerMoney(playerid,SBizzInfo[bouse][sbBuyPrice]);
    SBizzInfo[bouse][sbLocked] = 1;
    SBizzInfo[bouse][sbOwned] = 0;
    GetPlayerName(playerid, sendername, sizeof(sendername));
    strmid(SBizzInfo[bouse][sbOwner], "Drzava", 0, strlen("Drzava"), 255);
    strmid(SBizzInfo[bouse][sbExtortion], "Niko", 0, strlen("Niko"), 255);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Cestitamo~n~ Prodali ste biznis za ~n~~g~$%d", SBizzInfo[bouse][sbBuyPrice]);
    GameTextForPlayer(playerid, string, 10000, 3);
    SBizzInfo[bouse][sbTill] = 0;
    PlayerInfo[playerid][pPbiskey] = 255;
    OnPropUpdate();
    OnPropTextdrawUpdate(3, bouse);
    OnPlayerUpdate(playerid);
    return 1;
   }
   if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0)
   {
    new bouse = PlayerInfo[playerid][pPbiskey];
    BizzInfo[bouse][bLocked] = 1;
    BizzInfo[bouse][bOwned] = 0;
    GetPlayerName(playerid, sendername, sizeof(sendername));
    strmid(BizzInfo[bouse][bOwner], "Drzava", 0, strlen("Drzava"), 255);
    strmid(BizzInfo[bouse][bExtortion], "Niko", 0, strlen("Niko"), 255);
    GivePlayerMoney(playerid,BizzInfo[bouse][bBuyPrice]);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Cestitamo~n~ Prodali ste biznis za ~n~~g~$%d", BizzInfo[bouse][bBuyPrice]);
    GameTextForPlayer(playerid, string, 10000, 3);
    BizzInfo[bouse][bTill] = 0;
    PlayerInfo[playerid][pPbiskey] = 255;
    OnPropUpdate();
    OnPlayerUpdate(playerid);
    OnPropTextdrawUpdate(2, bouse);
    return 1;
   }
   else
   {
    SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujete biznis.");
   }
  }
  return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): /