[POMOC] Sellbiz

Započeo |Xeptic| Führer, April 28, 2011, 10:32:12 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:LARP edit
Detaljan opis problema:Pa kad idem /sellbiz nece da mi da pare.+
Dio skripte:
if(strcmp(cmd, "/sellbiz", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pPbiskey] == 255)
{
SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes Bizz.");
return 1;
}
if(PlayerInfo[playerid][pMarried] > 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Ozenjen si, nemozes prodati Bizz !");
        return 1;
    }
if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
{
new bouse = PlayerInfo[playerid][pPbiskey]-100;
SafeGivePlayerMoney(playerid,SBizzInfo[bouse][sbTill]);
SBizzInfo[bouse][sbLocked] = 1;
SBizzInfo[bouse][sbOwned] = 0;

strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);
strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255);
//ConsumingMoney[playerid] = 1;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Cestitamo~n~ Prodali ste Bizz za ~n~~g~$%d", SBizzInfo[bouse][sbTill]);
GameTextForPlayer(playerid, string, 10000, 3);
SBizzInfo[bouse][sbTill] = 0;
PlayerInfo[playerid][pPbiskey] = 255;
OnPropUpdate(3);
OnPlayerUpdateEx(playerid);
OnPropTextdrawUpdate(3, bouse);
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;

strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255);
strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255);
//ConsumingMoney[playerid] = 1;
SafeGivePlayerMoney(playerid,BizzInfo[bouse][bTill]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Cestitamo~n~ Prodali ste Bizz za ~n~~g~$%d", BizzInfo[bouse][bTill]);
GameTextForPlayer(playerid, string, 10000, 3);
BizzInfo[bouse][bTill] = 0;
PlayerInfo[playerid][pPbiskey] = 255;
OnPropUpdate(2);
OnPlayerUpdateEx(playerid);
OnPropTextdrawUpdate(2, bouse);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes Bizz.");
}
}

new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /sellbiz",d,m,y,h,mi,s,sendername);
CommandLog(string);
return 1;
}

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

if(strcmp(cmd, "/sellbiz", true) == 0)
   {
       if(IsPlayerConnected(playerid))
      {
         GetPlayerName(playerid, playername, sizeof(playername));
         if(PlayerInfo[playerid][pPbiskey] == 255)
         {
            SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes Bizz.");
            return 1;
         }
         if(PlayerInfo[playerid][pMarried] > 0)
          {
              SendClientMessage(playerid, COLOR_GREY, "   Ozenjen si, nemozes prodati Bizz !");
              return 1;
          }
         if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
         {
            new bouse = PlayerInfo[playerid][pPbiskey]-100;
            SafeGivePlayerMoney(playerid,SBizzInfo[bouse][sbTill]);
            SafeGivePlayerMoney(playerid,BizzInfo[bouse][bBuyPrice]);
            SBizzInfo[bouse][sbLocked] = 1;
            SBizzInfo[bouse][sbOwned] = 0;

            strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);
            strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255);
            //ConsumingMoney[playerid] = 1;
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            format(string, sizeof(string), "~w~Cestitamo~n~ Prodali ste Bizz za ~n~~g~$%d", SBizzInfo[bouse][sbTill]);
            GameTextForPlayer(playerid, string, 10000, 3);
            SBizzInfo[bouse][sbTill] = 0;
            PlayerInfo[playerid][pPbiskey] = 255;
            OnPropUpdate(3);
            OnPlayerUpdateEx(playerid);
            OnPropTextdrawUpdate(3, bouse);
            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;

            strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255);
            strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255);
            //ConsumingMoney[playerid] = 1;
            SafeGivePlayerMoney(playerid,BizzInfo[bouse][bBuyPrice]);
            SafeGivePlayerMoney(playerid,BizzInfo[bouse][bTill]);
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            format(string, sizeof(string), "~w~Cestitamo~n~ Prodali ste Bizz za ~n~~g~$%d", BizzInfo[bouse][bTill]);
            GameTextForPlayer(playerid, string, 10000, 3);
            BizzInfo[bouse][bTill] = 0;
            PlayerInfo[playerid][pPbiskey] = 255;
            OnPropUpdate(2);
            OnPlayerUpdateEx(playerid);
            OnPropTextdrawUpdate(2, bouse);
            return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes Bizz.");
         }
      }

      new y, m, d;
      new h,mi,s;
      getdate(y,m,d);
      gettime(h,mi,s);
      format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /sellbiz",d,m,y,h,mi,s,sendername);
      CommandLog(string);
      return 1;
   }