Egy gfbol másold ki a sima /ad-ot, a saját /bm-em pedig mindjárt elokeresem neked
Itt a feketepiac[by SnicK & Skynny]:
if(strcmp(cmd, \"/blackmarket\", true) == 0 || strcmp(cmd, \"/bm\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, \"Elöbb jelentkezz be!\");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, \"Min lvl2!\");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
{
SendClientMessage(playerid, COLOR_GREY, \"Legális szervezet nem használhatja!\");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= \' \'))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, \"Használat: /bm [Hirdetési szöveg]\");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), \"Kérlek várj %d másodpercet!\", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
new payout = idx * 5;
if(GetPlayerMoney(playerid) < payout)
{
format(string, sizeof(string), \"* %d karakter használtál aminek az ára $%d, de neked nincs ennyid.\", offset, payout);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
SBizzInfo[7][sbTill] += payout;
ExtortionSBiz(7, payout);
format(string, sizeof(string), \"[FEKETEPIAC] %s, Név: %s Tel: %d\", result, sendername, PlayerInfo[playerid][pPnumber]);
OOCNews(COLOR_RED,string);
format(string, sizeof(string), \"~r~Fizettel $%d~n~~w~A hirdetes: %d karaktert tartalmazott.\", payout, idx);
GameTextForPlayer(playerid, string, 5000, 1);
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer(\"AddsOn\", addtimer, 0);adds = 0;}
}
return 1;
}