Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: hood9 poslato Mart 16, 2011, 16:15:54 POSLE PODNE

Naslov: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: hood9 poslato Mart 16, 2011, 16:15:54 POSLE PODNE
Skripta koju koristim: svoj mod od 0
Detaljan opis problema: želio bih u komandu /report ubacit ono da nemoze svake sekunde spamat na /report neg svake 1 min da moze /report pisat
Dio skripte:

if(strcmp(cmd, "/report", 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, "Koristite: /report [text]");
            return 1;
         }
         format(string, sizeof(string), "Report od %s: %s", sendername, (result));
         ABroadCast(COLOR_YELLOW,string,1);
         SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Slavonija: Hvala na upitu, Admini ce odgovoriti u najkracem roku!");
       }
       return 1;
   }
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: DoN poslato Mart 16, 2011, 18:24:10 POSLE PODNE
Uzmi /report iz GTA:RP ako znas ga kopirat...
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: [Modern]°°Lopez°° poslato Mart 16, 2011, 21:55:10 POSLE PODNE
Nemoj nista kopirati je sa time nikad nista neces nauciti!evo ti komanda i sve ostalo!

1: pronadi ((CTRL+F)) gSpeedo
ispod toga dodaj Report
2: pronadi ((CTRl+F))gSpeedo[playerid] = 0;
i dodaj Report[playerid] = 0;
3: Pronadi ((CTRL+F)) forward
i dodaj forward Reportp();
Komanda:
if(strcmp(cmd, "/report", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    if (Report[playerid] == 0)
{
       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_WHITE, "Koristite: /report [text]");
return 1;
}
format(string, sizeof(string), "||R|| %s: %s", sendername, (result));
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Vas report je poslan svim online Administratorima!");
SetTimer("Reportp", 60000, 0); //60000 = 1min
Report[playerid] = 1;
   }
}
   return 1;
}

i skroz na kraj scripte

public Reportp()
{
   Report[playerid] = 0;
}
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: [AG] N1n0 poslato Mart 16, 2011, 22:08:13 POSLE PODNE
Citat: ivica. poslato Mart 16, 2011, 21:55:10 POSLE PODNE
Nemoj nista kopirati je sa time nikad nista neces nauciti!evo ti komanda i sve ostalo!

1: pronadi ((CTRL+F)) gSpeedo
ispod toga dodaj Report
2: pronadi ((CTRl+F))gSpeedo[playerid] = 0;
i dodaj Report[playerid] = 0;
3: Pronadi ((CTRL+F)) forward
i dodaj forward Reportp();
Komanda:
if(strcmp(cmd, "/report", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    if (Report[playerid] == 0)
{
       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_WHITE, "Koristite: /report [text]");
return 1;
}
format(string, sizeof(string), "||R|| %s: %s", sendername, (result));
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Vas report je poslan svim online Administratorima!");
SetTimer("Reportp", 60000, 0); //60000 = 1min
Report[playerid] = 1;
   }
}
   return 1;
}

i skroz na kraj scripte

public Reportp()
{
   Report[playerid] = 0;
}

Zasto nebih koristio Pvar? ;)
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: .G.h.0.s.T. poslato Mart 16, 2011, 22:09:31 POSLE PODNE
Citat: [AG] N1n0 poslato Mart 16, 2011, 22:08:13 POSLE PODNE
Zasto nebih koristio Pvar? ;)

pa koristi onda PVar...
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: [Modern]°°Lopez°° poslato Mart 16, 2011, 22:18:46 POSLE PODNE
Citat: [AG] N1n0 poslato Mart 16, 2011, 22:08:13 POSLE PODNE
Citat: ivica. poslato Mart 16, 2011, 21:55:10 POSLE PODNE
Nemoj nista kopirati je sa time nikad nista neces nauciti!evo ti komanda i sve ostalo!

1: pronadi ((CTRL+F)) gSpeedo
ispod toga dodaj Report
2: pronadi ((CTRl+F))gSpeedo[playerid] = 0;
i dodaj Report[playerid] = 0;
3: Pronadi ((CTRL+F)) forward
i dodaj forward Reportp();
Komanda:
if(strcmp(cmd, "/report", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    if (Report[playerid] == 0)
{
       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_WHITE, "Koristite: /report [text]");
return 1;
}
format(string, sizeof(string), "||R|| %s: %s", sendername, (result));
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Vas report je poslan svim online Administratorima!");
SetTimer("Reportp", 60000, 0); //60000 = 1min
Report[playerid] = 1;
   }
}
   return 1;
}

i skroz na kraj scripte

public Reportp()
{
   Report[playerid] = 0;
}

Zasto nebih koristio Pvar? ;)
zato sto nezna ni ovaku komandu napravit a ne da se sa pvarovima drka jos,daj malo ukljucite logiku!
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: hood9 poslato Mart 16, 2011, 22:29:22 POSLE PODNE
daj ti decko odjebi disi ti bio kad sam komande radio sam ovo neznam žvaljo jedan žvaljavi
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: [Modern]°°Lopez°° poslato Mart 16, 2011, 22:30:07 POSLE PODNE
Citat: hood9 poslato Mart 16, 2011, 22:29:22 POSLE PODNE
daj ti decko odjebi disi ti bio kad sam komande radio sam ovo neznam žvaljo jedan žvaljavi
1 prijava smodu/gmodu
2 vidim kako rasi komande HAHHA
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: hood9 poslato Mart 16, 2011, 22:32:55 POSLE PODNE
stas ti prijavit cobane jedan ak nes pomoc Odj... od ove TEME
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: SoNNix poslato Mart 16, 2011, 22:40:05 POSLE PODNE
ne svadajte se
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: [Modern]°°Lopez°° poslato Mart 16, 2011, 22:44:32 POSLE PODNE
Citat: hood9 poslato Mart 16, 2011, 22:32:55 POSLE PODNE
stas ti prijavit cobane jedan ak nes pomoc Odj... od ove TEME
e a cuj ti sebe ajd digni malo nos nebudi toliko ljen i digni stranicu pa pogledaj moj post gdje ti pise cijela komanda,a bota majke ti mile i ide jos jedna prijava!:**
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: [AG] N1n0 poslato Mart 16, 2011, 22:48:39 POSLE PODNE
Ajde vise oladite malo, smarate! :-\
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: hood9 poslato Mart 16, 2011, 22:50:30 POSLE PODNE
sorry ivice nisam vidio tebe da si mi ti komandu napiso :S
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: [Modern]°°Lopez°° poslato Mart 16, 2011, 22:51:32 POSLE PODNE
ma zaboli me ona stvar tebi je prijava osla!
Naslov: Odg: [Pomoc]Kako da ubacim u komandu /report da igrac svake 1min moze /report pisat
Poruka od: Rotcod poslato Mart 17, 2011, 09:13:40 PRE PODNE
Citat: ivica. poslato Mart 16, 2011, 21:55:10 POSLE PODNE
Nemoj nista kopirati je sa time nikad nista neces nauciti!evo ti komanda i sve ostalo!

1: pronadi ((CTRL+F)) gSpeedo
ispod toga dodaj Report
2: pronadi ((CTRl+F))gSpeedo[playerid] = 0;
i dodaj Report[playerid] = 0;
3: Pronadi ((CTRL+F)) forward
i dodaj forward Reportp();
Komanda:
if(strcmp(cmd, "/report", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    if (Report[playerid] == 0)
{
       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_WHITE, "Koristite: /report [text]");
return 1;
}
format(string, sizeof(string), "||R|| %s: %s", sendername, (result));
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Vas report je poslan svim online Administratorima!");
SetTimer("Reportp", 60000, 0); //60000 = 1min
Report[playerid] = 1;
   }
}
   return 1;
}

i skroz na kraj scripte

public Reportp()
{
   Report[playerid] = 0;
}

SetTimerEx (http://wiki.sa-mp.com/wiki/SetTimerEx)