Szerző Téma: Anti flood Problem  (Megtekintve 1718 alkalommal)

Anti flood Problem
« Dátum: 2014. Április 13. - 22:33:06 »
0
Hi
Ez miért nem megy rendesen ha floodolok akkor kiírja az üzenetet is meg azt is, hogy ne floodojak pedig csak azt kéne kiírja, hogy ne floodoljak
 
#define SPAM_TIME (3)
new gPlayerSpamTick[MAX_PLAYERS];
public OnPlayerText(playerid, text[]) {
new TickCount = GetTickCount( );
    SetPlayerChatBubble(playerid, text, 0x99FF00AA, 100.0, 10000);
if( gPlayerSpamTick[ playerid ] > ( TickCount - ( SPAM_TIME * 600 ) ) )
{
    SendClientMessage( playerid, 0xEB000FFF, \"{FF0000}Ne floodoj várj {33CCFF}3 {FF0000}másodpercet két üzenet közot!\" );
gPlayerSpamTick[ playerid ] = GetTickCount( );
return 0;
}
    gPlayerSpamTick[ playerid ] = GetTickCount( );
    return 0;
}
« Utoljára szerkesztve: 2014. Április 14. - 17:38:22 írta Andorko »

Nem elérhető doboka98

  • 1002
    • Profil megtekintése
Anti flood Problem
« Válasz #1 Dátum: 2014. Április 14. - 10:01:05 »
0
Talán így:
 
#define SPAM_TIME (3)
new gPlayerSpamTick[MAX_PLAYERS];
public OnPlayerText(playerid, text[]) {
new TickCount = GetTickCount( );
if( gPlayerSpamTick[ playerid ] > ( TickCount - ( SPAM_TIME * 600 ) ) )
{
    SendClientMessage( playerid, 0xEB000FFF, \"{FF0000}Ne floodoj várj {33CCFF}3 {FF0000}másodpercet két üzenet közot!\" );
gPlayerSpamTick[ playerid ] = GetTickCount( );
return 0;
}
    SetPlayerChatBubble(playerid, text, 0x99FF00AA, 100.0, 10000);
    gPlayerSpamTick[ playerid ] = GetTickCount( );
    return 0;
}

Anti flood Problem
« Válasz #2 Dátum: 2014. Április 14. - 11:25:42 »
0
Mostse jó

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Anti flood Problem
« Válasz #3 Dátum: 2014. Április 14. - 13:47:51 »
+1

#define FLOODTIME 3
public OnPlayerText(playerid, text[])
{
//Flood time
new TickCount = GetTickCount();
if(GetPVarInt(playerid,\"FloodTime\") > (TickCount-(FLOODTIME * 600))){
SendClientMessage(playerid, 0xFF0000AA, \"{ff0000}Várj {ffffff}\"#FLOODTIME\" {ff0000}másodpercet míg újból írsz!\");
return 0;
}
SetPVarInt(playerid,\"FloodTime\",GetTickCount());
return 0;
}

 Vagy próbáld meg ezzel én ezt használom és mûködik!

Anti flood Problem
« Válasz #4 Dátum: 2014. Április 14. - 15:28:52 »
0
Ezsem jó

Nem elérhető doboka98

  • 1002
    • Profil megtekintése
Anti flood Problem
« Válasz #5 Dátum: 2014. Április 14. - 16:23:52 »
0
A szervered újraindítod miután berakod a szkriptet?

Anti flood Problem
« Válasz #6 Dátum: 2014. Április 14. - 16:28:56 »
0
Ja
Mert a Gamemodeba rakom be

Anti flood Problem
« Válasz #7 Dátum: 2014. Április 14. - 17:17:29 »
0
#define FLOODTIME 3
public OnPlayerText(playerid, text[])
{
//Flood time
if(GetPVarInt(playerid,\"FloodTime\") > gettime()){
SendClientMessage(playerid, 0xFF0000AA, \"{ff0000}Várj {ffffff}\"#FLOODTIME\" {ff0000}másodpercet míg újból írsz!\");
return 0;
}
SetPVarInt(playerid,\"FloodTime\", gettime() + FLOODTIME);
return 0;
}

Anti flood Problem
« Válasz #8 Dátum: 2014. Április 14. - 17:37:50 »
0
Köszi most mûködik
zárok

Anti flood Problem
« Válasz #9 Dátum: 2014. Április 13. - 22:33:06 »
0
Hi
Ez miért nem megy rendesen ha floodolok akkor kiírja az üzenetet is meg azt is, hogy ne floodojak pedig csak azt kéne kiírja, hogy ne floodoljak
 
#define SPAM_TIME (3)
new gPlayerSpamTick[MAX_PLAYERS];
public OnPlayerText(playerid, text[]) {
new TickCount = GetTickCount( );
    SetPlayerChatBubble(playerid, text, 0x99FF00AA, 100.0, 10000);
if( gPlayerSpamTick[ playerid ] > ( TickCount - ( SPAM_TIME * 600 ) ) )
{
    SendClientMessage( playerid, 0xEB000FFF, \"{FF0000}Ne floodoj várj {33CCFF}3 {FF0000}másodpercet két üzenet közot!\" );
gPlayerSpamTick[ playerid ] = GetTickCount( );
return 0;
}
    gPlayerSpamTick[ playerid ] = GetTickCount( );
    return 0;
}
« Utoljára szerkesztve: 2014. Április 14. - 17:38:22 írta Andorko »

Nem elérhető doboka98

  • 1002
    • Profil megtekintése
Anti flood Problem
« Válasz #10 Dátum: 2014. Április 14. - 10:01:05 »
0
Talán így:
 
#define SPAM_TIME (3)
new gPlayerSpamTick[MAX_PLAYERS];
public OnPlayerText(playerid, text[]) {
new TickCount = GetTickCount( );
if( gPlayerSpamTick[ playerid ] > ( TickCount - ( SPAM_TIME * 600 ) ) )
{
    SendClientMessage( playerid, 0xEB000FFF, \"{FF0000}Ne floodoj várj {33CCFF}3 {FF0000}másodpercet két üzenet közot!\" );
gPlayerSpamTick[ playerid ] = GetTickCount( );
return 0;
}
    SetPlayerChatBubble(playerid, text, 0x99FF00AA, 100.0, 10000);
    gPlayerSpamTick[ playerid ] = GetTickCount( );
    return 0;
}

Anti flood Problem
« Válasz #11 Dátum: 2014. Április 14. - 11:25:42 »
0
Mostse jó

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Anti flood Problem
« Válasz #12 Dátum: 2014. Április 14. - 13:47:51 »
0

#define FLOODTIME 3
public OnPlayerText(playerid, text[])
{
//Flood time
new TickCount = GetTickCount();
if(GetPVarInt(playerid,\"FloodTime\") > (TickCount-(FLOODTIME * 600))){
SendClientMessage(playerid, 0xFF0000AA, \"{ff0000}Várj {ffffff}\"#FLOODTIME\" {ff0000}másodpercet míg újból írsz!\");
return 0;
}
SetPVarInt(playerid,\"FloodTime\",GetTickCount());
return 0;
}

 Vagy próbáld meg ezzel én ezt használom és mûködik!

Anti flood Problem
« Válasz #13 Dátum: 2014. Április 14. - 15:28:52 »
0
Ezsem jó

Nem elérhető doboka98

  • 1002
    • Profil megtekintése
Anti flood Problem
« Válasz #14 Dátum: 2014. Április 14. - 16:23:52 »
0
A szervered újraindítod miután berakod a szkriptet?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal