SA-MP Forums Archive
0$ = SERVER: Unknown command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 0$ = SERVER: Unknown command (/showthread.php?tid=552397)



0$ = SERVER: Unknown command - Metharon - 24.12.2014

I want to try this:

- The player 1 when is typing /sellsbizz player2 price to set sboPLA[player1] = player2
- if player 2 type : /accept sbizz & player 1 sboPLA[player1] == player2 ... to sell the sbizz.

but i get this :


The sell command:
pawn Код:
if(ProxDetectorS(5.0, playerid, giveplayerid))
{
    sboPLA[giveplayerid] = playerid;
    sboCASH[giveplayerid] = moneys;
    sboOFFER[playerid] = giveplayerid;
    SbizzSellActivated[giveplayerid] = 1;
    SbizzSellActivated[playerid] = 1;
}
The accept command:

pawn Код:
if(strcmp(x_nr,"sbizz",true) == 0)
        {
        if(SbizzSellActivated[playerid] == 0) return 1;
            if(sboOFFER[sboPLA[playerid]] == playerid && sboCASH[sboPLA[playerid]] > Cash[playerid]) //there's the problem i think..
            {
                new vanzator = sboPLA[playerid];
               
                PlayerInfo[playerid][sBusiness] = PlayerInfo[vanzator][sBusiness];
               
                PlayerInfo[playerid][sBusiness] = 255;
               
                TakePlayerMoneyEx(playerid, sboCASH[playerid]);
               
                GivePlayerMoneyEx(sboPLA[playerid], sboCASH[playerid]);
               
                new IDSB = PlayerInfo[playerid][sBusiness];
               
                format(sBizz[IDSB][sBDetinator], 50, "%s", GetName(sboPLA[playerid]));
               
                format(string, sizeof(string), "{FFCC00}[ %s ]\n\n( Detinator: {00cc33} %s {FFCC00})", sBizz[IDSB][sBTitlu], sBizz[IDSB][sBDetinator]);
               
                UpdateDynamic3DTextLabelText(Text3D:sbizz[IDSB], -1, string);
               
                sboOFFER[sboPLA[playerid]] = 0;
               
                sboCASH[playerid] = 0;
               
                sboPLA[playerid] = 0;
               
                SbizzSellActivated[vanzator] = 0;
               
                SbizzSellActivated[playerid] = 0;
            }
            SendClientMessage(playerid, -1, "n-am ers");
            return 1;
        }
The full commands: http://pastebin.com/raw.php?i=gW51dxU0


Please help me ... is important +1 for who find out the problem..


Respuesta: 0$ = SERVER: Unknown command - Dan2312 - 24.12.2014

The problem is that don't work or that show you "Unknown command"??


Re: 0$ = SERVER: Unknown command - Metharon - 24.12.2014

is don't work.... but why ? the player have the good plo settings..


Re: 0$ = SERVER: Unknown command - cm666 - 24.12.2014

sboPLA[MAX_PLAYERS]; ?


Re: 0$ = SERVER: Unknown command - Metharon - 24.12.2014

I create the variable.. the problem is simply not working , no errors on compiling.


Re: 0$ = SERVER: Unknown command - Metharon - 24.12.2014

up?...