pomoc oko biza

Započeo [BP] HeLoX ba! ^^, April 13, 2010, 12:34:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

trebam pomoc, kako da u ovaj kod stavim da mi pare idu u odredjen bizz?


if(strcmp(cmd, "/vibrator", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (!PlayerToPoint(3, playerid,-105.2859,-10.6160,1000.7188))//sex shop
{
SendClientMessage(playerid, COLOR_RED, "   Niste u Sex Shopu");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREEN, "KORIÅ TENJE: /vibrator [broj vibratora]");
SendClientMessage(playerid, COLOR_RED, "|_______ Sex Shop _______|");
SendClientMessage(playerid, COLOR_GREEN, "| 1: Ljubicasti $20       2: Mali Bijeli $12");
SendClientMessage(playerid, COLOR_GREEN, "| 3: Veliki Bijeli $17      4: Sivi $15");
SendClientMessage(playerid, COLOR_GREEN, "| 5: Kondomi $1");
return 1;
}
new item = strval(tmp);
if(SBizzInfo[9][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nestalo nam je...", 5000, 1);
return 1;
}

else if (item == 1 && GetPlayerMoney(playerid) > 20)
{
    SafeGivePlayerMoney(playerid, -20);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    GivePlayerWeapon(playerid, 10, 1);
    GameTextForPlayer(playerid, "~r~-$20", 2000, 1);
return 1;
}

else if (item == 2 && GetPlayerMoney(playerid) > 13)
{
    SafeGivePlayerMoney(playerid, -20);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    GivePlayerWeapon(playerid, 11, 1);
    GameTextForPlayer(playerid, "~r~-$13", 2000, 1);
return 1;
}


else if (item == 3 && GetPlayerMoney(playerid) > 17)
{
    SafeGivePlayerMoney(playerid, -20);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    GivePlayerWeapon(playerid, 12, 1);
    GameTextForPlayer(playerid, "~r~-$17", 2000, 1);
return 1;
}

            else if (item == 4 && GetPlayerMoney(playerid) > 15)
{
    SafeGivePlayerMoney(playerid, -20);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    GivePlayerWeapon(playerid, 13, 1);
    GameTextForPlayer(playerid, "~r~-$15", 2000, 1);
return 1;
}

else if (item == 5 && GetPlayerMoney(playerid) > 1)
{
    if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 1 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 1 - price;
SafeGivePlayerMoney(playerid,- payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
    SafeGivePlayerMoney(playerid,-1);
format(string, sizeof(string), "~r~-$%d", 1);
GameTextForPlayer(playerid, string, 5000, 1);
}
Condom[playerid] ++;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Kondom kupljen.");
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}

else
{
SendClientMessage(playerid, COLOR_RED, "   Nemate dovoljno novca za to!");
}
}
return 1;
}


[BP] HeLoX ba! ^^
Forum: balkan-paradise.info- Još u izradi!