/*------------------------------------------------------------------------------*/
if(strcmp(cmd, "/oglas", true) == 0 || strcmp(cmd, "/og", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged == 0)
{
SendClientMessage(playerid, LIGHTBLUE, " Niste prijavljeni (logirani) !");
return 1;
}
if(PlayerInfo < 7)
{
format(string, sizeof(string), "Morate Biti level 1 da bi ste dali !");
SendClientMessage(playerid, LIGHTBLUE, string);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext <= ' '))
{
idx++;
}
new offset = idx;
new result;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext;
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, LIGHTBLUE, "Komanda: /oglas ");
return 1;
}
if ((!adds) && (PlayerInfo < 1))
{
format(string, sizeof(string), " Molimo pricekajte %d sekunda izmedu oglasa !", (addtimer/1000));
SendClientMessage(playerid, LIGHTBLUE, string);
return 1;
}
new payout = idx * 25;
if(JB_GetPlayerMoney(playerid) < payout)
{
format(string, sizeof(string), "Upotrebili ste %d slova, to kosta $%d, nemate dovoljno.", offset, payout);
SendClientMessage(playerid, LIGHTBLUE, string);
return 1;
}
JB_GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), ": %s \nKontakt: %s \nBroj: %d |", result, sendername,PlayerInfo);
TextDrawShowForAll(TxtGov);
TextDrawSetString(Txtgov, string);
SetTimer("Hidegov", 30000, 0);
OOCNews(0x0087FFFF,string);
format(string, sizeof(string), "~p~Platili ste $%d~n~~w~Oglas se sastoji od: %d slova", payout, idx);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
}
return 1;
}
Evo ti cjela komanda