Detaljan opis problema: Pa sad napravio sam da se /ad pusta na vise mesta i kad udzem na server pisem neku drugu CMD ono mi izlazi niste u oglasnik, kako svaka komanda da je povrzana s tu komandu
Dio skripte: Evo komanda
if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (!PlayerToPoint(5, playerid, -2240.468505,137.060440,1035.414062))
{
SendClientMessage(playerid, COLOR_GREY, "Neste vo oglasnik!");
return 1;
}
if(gPlayerLogged == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Seuste ne ste logirani !");
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, COLOR_GRAD2, "KORISTI: (/ad)vertise [advert text]");
return 1;
}
if ((!adds) && (PlayerInfo < 1))
{
format(string, sizeof(string), " Ve molime probajte podocna %d sekundi pomegu oglasot !", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
new payout = idx * 25;
if(GetPlayerMoney(playerid) < payout)
{
format(string, sizeof(string), "* Iskoristivte %d Bukvi koj cinat $%d, Nemate dovolno.", offset, payout);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
GivePlayerMoney(playerid, - payout);
SBizzInfo += payout;
ExtortionSBiz(7, payout);
format(string, sizeof(string), ": %s | Kontakt: %s Mobilen: %d", result, sendername,PlayerInfo);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Plativte $%d~n~~w~Poraka se sostoi od: %d Bukvi", payout, idx);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo < 1){SetTimer("AddsOn", addtimer, 0);adds = 0; return 1; }
}
if ((!adds) && (PlayerInfo < 1))
{
format(string, sizeof(string), " Ve molime probajte podocna %d sekundi pomegu oglasot !", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
if (!PlayerToPoint(5, playerid, 663.836242,-575.605407,16.343263))
{
SendClientMessage(playerid, COLOR_GREY, "Neste vo oglasnik!");
return 1;
}
new payout1 = idx * 25;
new offset1 = idx;
if(GetPlayerMoney(playerid) < payout1)
{
format(string, sizeof(string), "* Iskoristivte %d Bukvi koj cinat $%d, Nemate dovolno.", offset1, payout1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
new result1;
GivePlayerMoney(playerid, - payout1);
SBizzInfo += payout1;
ExtortionSBiz(7, payout1);
format(string, sizeof(string), ": %s | Kontakt: %s Mobilen: %d", result1, sendername,PlayerInfo);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Plativte $%d~n~~w~Poraka se sostoi od: %d Bukvi", payout1, idx);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo < 1){SetTimer("AddsOn", addtimer, 0);adds = 0; return 1; }
}
if ((!adds) && (PlayerInfo < 1))
{
format(string, sizeof(string), " Ve molime probajte podocna %d sekundi pomegu oglasot !", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
if (!PlayerToPoint(5, playerid, -103.559165,-24.225606,1000.718750))
{
SendClientMessage(playerid, COLOR_GREY, "Neste vo oglasnik!");
return 1;
}
new payout2 = idx * 25;
new offset2 = idx;
if(GetPlayerMoney(playerid) < payout2)
{
format(string, sizeof(string), "* Iskoristivte %d Bukvi koj cinat $%d, Nemate dovolno.", offset2, payout2);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
new result2;
GivePlayerMoney(playerid, - payout2);
SBizzInfo += payout2;
ExtortionSBiz(7, payout2);
format(string, sizeof(string), ": %s | Kontakt: %s Mobilen: %d", result2, sendername,PlayerInfo);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Plativte $%d~n~~w~Poraka se sostoi od: %d Bukvi", payout2, idx);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;
return 1;
}