-
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;
}
-
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;
}
-
Mostse jó
-
#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!
-
Ezsem jó
-
A szervered újraindítod miután berakod a szkriptet?
-
Ja
Mert a Gamemodeba rakom be
-
#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;
}
-
Köszi most mûködik
zárok
-
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;
}
-
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;
}
-
Mostse jó
-
#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!
-
Ezsem jó
-
A szervered újraindítod miután berakod a szkriptet?
-
Ja
Mert a Gamemodeba rakom be
-
#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;
}
-
Köszi most mûködik
zárok