[POMOC]Oko komandi

Započeo hood9, April 12, 2011, 15:27:59 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: moja
Detaljan opis problema: Kako da napravim da da /report vide ADMINI,a /pomoc da vide i admini i GS,a i kako da napravim da kad napisem /new,/pomoc,/report da moraju cekati 1min do iduceg slanja /reporta,/new,/pomoc



if(strcmp(cmd,"/pomoc",true)==0)
{
    if(IsPlayerConnected(playerid))
    {
        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, "Koristi: /pomoc [text]");
    return 1;
  }
      format(string, sizeof(string), "(Pomoc) od %s[%d]: %s", sendername, playerid, (result));
SendGSMessage(COLOR_NEWS, string);
  SendClientMessage(playerid, COLOR_YELLOW, "Pomoc poslana online GameSagesima");
    }
    return 1;
}



if(strcmp(cmd, "/new", true) == 0)
{
    if(IsPlayerConnected(playerid))

    {
  GetPlayerName(playerid, sendername, sizeof(sendername));
  format(string, 256, "|Novi igrac| %s (id: %d) | Potrebna pomoc |",sendername, playerid);
  ABroadCast(COLOR_YELLOW,string,1);
  SendAdminMessage(COLOR_YELLOW, string);
  SendClientMessage(playerid, COLOR_YELLOW, "Zahtjev| Vas zahtjev za pomoc je poslan Administratorima/GameSagesima");
}
return 1;
}


//----------------------------------[Oglasavanje]-----------------------------------------------
if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if(gPlayerLogged[playerid] == 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
           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, "Koristite: (/ad)vertise [advert text]");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "   Please try again later %d seconds between Advertisements !",  (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;

}
new payout = idx * 25;
if(GetPlayerMoney(playerid) < payout)
       {
           format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
           return 1;
       }
       if(PlayerInfo[playerid][pLevel] < 3)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Koristite: (/ad)vertise [advert text]");
           SendClientMessage(playerid, COLOR_GREY, "   Vas zahtjev nije moguc, morate biti minimalno lv3 !");
           return 1;
       }
GivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout;
ExtortionSBiz(7, payout);
format(string, sizeof(string), "{6EF83C}Oglasavnje |: {FFFFFF}%s, {6EF83C}Autor: %s| {F3FF02}Kontakt broj: %d",  result, sendername,PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
}
return 1;
}

poznaticovik

Ovo za čekanje pomoću SetTimerEx.

pa de kako nekuzim pomozi mi  :S