24.12.2014, 10:21
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:
The accept command:
The full commands: http://pastebin.com/raw.php?i=gW51dxU0
Please help me ... is important +1 for who find out the problem..
- 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;
}
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;
}
Please help me ... is important +1 for who find out the problem..