[POMOC]Ad

Započeo JONY, Februar 24, 2012, 15:10:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:BN
Detaljan opis problema:pa zelio bih napraviti u komandu da se svako 40 sec moze dati oglas a ne svake sekunde msm to uopce nema ograniceno tajmerom .ako neko zna kako cu dodat timer al da radi
Dio skripte: CMD:ad(playerid, params[])
{
new string[200];
new sendername[MAX_PLAYER_NAME];
new oglastekst[128], payout;
if(sscanf(params, "s[128]", oglastekst))
{
SCM(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} (/ad)vertise [tekst oglasa]");
return 1;
}
else
{
if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), " {FFFF80}server | {FF4444}Ne mozes oglasavati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
if(PlayerInfo[playerid][pLevel] <= 2)
{
format(string, sizeof(string), " {FFFF80}server| {FF4444}Moras biti {FFFF80}lvl 3+ {FF4444}da bi mogao pisati oglase!");
SCM(playerid, 0xFF4444FF, string);
return 1;
}
if (oglasvrijeme >= 0 && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "   Sacekaj jos %d sekundi prije ponovnog postavljanja oglasa !",  oglasvrijeme);
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;

}
payout = cijenaoglasa1;
if(GetPlayerCash(playerid) < payout)
        {

            format(string, sizeof(string), "* Nemas dovoljno novca!{FF5E5E} (Potrebno %d$) ", payout);
            SendClientMessage(playerid, 0xB9B9B9FF, string);
            return 1;
        }

for(new i = 0; i < sizeof(Dionice); i++)
{
if(Dionice[i][dType] == 1)
{
Dionice[i][dKasa1] += payout/10;
Dionice[i][dKasa2] += payout/10;
Dionice[i][dKasa3] += payout/10;
Dionice[i][dKasa4] += payout/10;
Dionice[i][dKasa5] += payout/10;
Dionice[i][dKasa6] += payout/10;
Dionice[i][dKasa7] += payout/10;
Dionice[i][dKasa8] += payout/10;
Dionice[i][dKasa9] += payout/10;
Dionice[i][dKasa10] += payout/10;
SaveDionice(i);
}
}
new ostring[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "{6EF83C}||{FFFFFF}Oglas{6EF83C}|| Kontakt: {FFFFFF}%s {6EF83C}| Mobilni: {FFFFFF}%d {6EF83C}|", sendername,PlayerInfo[playerid][pPnumber]);
OOCNews(Zelenaa,string);
format(string, sizeof(string), "{FFFFFF}-%s",  oglastekst);
OOCNews(0x82FF00FF,string);
GivePlayerCash(playerid, - payout);
format(ostring, sizeof(ostring), "%s -> Oglas: %s", sendername,oglastekst);
OglasLog(ostring);
format(string, sizeof(string), "~r~Postavio si Oglas!~n~~w~Cijena: %d$", payout);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo[playerid][pAdmin] < 1)
{
oglasvrijeme = 45;
}
}
  return 1;
}

ricken