Detaljan opis problema: ovako,doÄ‘em do oglasnika i kucam /ad npr prodajem auto i objavim i zelim ponovo da iskoristim tu komandu izbaci mi morate sacekati minut izmedju oglasavanja,dobro uredu napravio sam timer za oglas i radi svake minute se može dati al to je samo za jednog igraÄa npr moj ja sam dao u trenu oglas odma kad sam ja dao moj frend dode do oglasnika i obadvojica smo u sekundi mogli dati oglas htio bih da svaki igrac može dat oglas al da saceka minut izmedju oglasavanja a ne da bude ovako
Dio skripte:
if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo < 5) return SCM(playerid, COLOR_GREY, "Morate biti lvl5 da bi dali oglas!");
if(gPlayerLogged == 0) return SCM(playerid, COLOR_GREY, "** Niste se ulogovali!");
if(PlayerInfo == 1) return SCM(playerid, TEAM_CYAN_COLOR, "Ne mozete da pricate ucutkani ste");
if(DaoOglas == 1) return SendClientMessage(playerid, COLOR_GREY,"Morate sacekati minut izmedju oglasavanja!");
if(PlayerInfo == 0) return SCM(playerid, COLOR_GREY, "Nemate telefon, kupite ga u prodavnici 24/7!");
if(PlayerCuffed != 0 || PlayerTied == 1) return SCM(playerid, COLOR_GREY, "Ne mozete da dajete oglas, vezani ste.");
}
{
if(gPlayerLogged == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Niste se prijavili !");
return 1;
}
if(PlayerInfo < 5)
{
SendClientMessage(playerid, COLOR_GREY, " Morate biti Level 5 da bi davali oglas !");
return 1;
}
if(!PlayerToPoint(5.0,playerid,1461.2137,-1011.1375,26.8438))
{
SendClientMessage(playerid, COLOR_GREY, " Niste na mjestu davanja oglasa !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
strreplace(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, "Koriscenje: (/ad)vertise [tekst oglasa]");
}
new payout = idx * 5;
JBC_GivePlayerMoney(playerid, -50);
format(string, sizeof(string), "~r~-$%d",50);
GameTextForPlayer(playerid, string, 5000, 1);
SBizzInfo += payout;
ExtortionSBiz(7, payout);
format(string, sizeof(string), "{498C12}{008CF0}%s {498C12}Kontakt:%d,{498C12}%s", result, PlayerInfo, sendername);
OOCNews(TEAM_GROVE_COLOR,string);
Update3DTextLabelText(oglas1, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas2, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas3, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas4, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas5, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas6, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas7, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas8, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas9, 0xFFFFFFAA, string);
Update3DTextLabelText(oglas10, 0xFFFFFFAA, string);
DaoOglas = 1;
SetTimer("OglasTimer", 60000, 1);
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
evo i public timera
public OglasTimer(playerid)
{
DaoOglas = 0;
return 1;
}