SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Espaņol/Spanish

Reply
 
Thread Tools Display Modes
Old 09/07/2012, 09:38 PM   #1
krauser
Big Clucker
 
Join Date: Jan 2012
Posts: 63
Reputation: 25
Default Problema mensaje flood

Pues tengo esque codigo, que te manda un mensaje si alguien usa fly hack, pero cuando salta hace un flood impresionante, aver si alguien me ayuda a que solo manda ese mensaje cada 3 segundos
pawn Code:
new i=0; i<MAX_PLAYERS; i++;
    new Float:animX, Float:animY, Float:animZ;
    new anim = GetPlayerAnimationIndex(playerid);
    GetPlayerPos(playerid, animX, animY, animZ);
    if((anim >= 1538) && (anim <= 1542) && animZ > 5)
    {
        format(string, 128, "* %s (ID:%d) esta usando Fly Hack.",pName(i), i);
        ABroadCast(RojoIntenso, string, 1);
    }
krauser is offline   Reply With Quote
Old 09/07/2012, 10:37 PM   #2
MrKaiser
Big Clucker
 
Join Date: Jul 2012
Location: Bariloche - Argentina
Posts: 50
Reputation: -1
Default Re: Problema mensaje flood

En que callback lo estas usando?
MrKaiser is offline   Reply With Quote
Old 09/07/2012, 10:39 PM   #3
krauser
Big Clucker
 
Join Date: Jan 2012
Posts: 63
Reputation: 25
Default Respuesta: Re: Problema mensaje flood

Quote:
Originally Posted by MrKaiser View Post
En que callback lo estas usando?
OnPlayerUpdate
krauser is offline   Reply With Quote
Old 09/07/2012, 10:55 PM   #4
Bu11Sh0t
Huge Clucker
 
Join Date: Jun 2012
Posts: 335
Reputation: 13
Default Respuesta: Problema mensaje flood

pawn Code:
new Adviced[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
    new i=0; i<MAX_PLAYERS; i++;
    new Float:animX, Float:animY, Float:animZ;
    new anim = GetPlayerAnimationIndex(playerid);
    GetPlayerPos(playerid, animX, animY, animZ);
    if((anim >= 1538) && (anim <= 1542) && animZ > 5)
    {
        if(Adviced[playerid] == 0)
        {
            format(string, 128, "* %s (ID:%d) esta usando Fly Hack.",pName(i), i);
            ABroadCast(RojoIntenso, string, 1);
            Adviced[playerid] = 1;
        }
    }
}
Y puedes hacer esto:
pawn Code:
#undef MAX_PLAYERS
#define MAX_PLAYERS 50 //Tus maximos jugadores
__________________
pawn Code:
public OnUserEnterForum(userid)
{
    SendClientMessage(userid, 0xFF0000FF, "Por favor, lee las reglas.");
    GameTextForPlayer(userid, "~r~ Por favor, lee las reglas.", 7000, 3);
    if(ReadRules[userid] == true) return 1;
    else Kick(userid);
}
Bu11Sh0t is offline   Reply With Quote
Old 10/07/2012, 12:07 AM   #5
godoy32
Huge Clucker
 
Join Date: Jul 2011
Posts: 264
Reputation: 8
Default Respuesta: Problema mensaje flood

Te recomiendo cambiarlo por un timmer.
pawn Code:
new Timer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
    Timer[playerid]=SetTimerEx("CheckFly",2000,"d",playerid);
}
forward CehckFly(playerid);
public CehckFly(playerid)
{
    new i=0; i<MAX_PLAYERS; i++;
    new Float:animX, Float:animY, Float:animZ;
    new anim = GetPlayerAnimationIndex(playerid);
    GetPlayerPos(playerid, animX, animY, animZ);
    if((anim >= 1538) && (anim <= 1542) && animZ > 5)
    {
        if(Adviced[playerid] == 0)
        {
            format(string, 128, "* %s (ID:%d) esta usando Fly Hack.",pName(i), i);
            ABroadCast(RojoIntenso, string, 1);
            Adviced[playerid] = 1;
        }
    }
}
public OnPlayerDisconnect(playerid)
{
    KillTimer(Timer[playerid]);
}

Last edited by godoy32; 17/07/2012 at 04:00 PM.
godoy32 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problema Flood BoSs_S Română/Romanian 8 10/04/2012 08:35 AM
Mensaje de bienvenida LULU Espaņol/Spanish 5 22/09/2011 07:59 PM
[Ayuda] Mensaje de /puente Sergikoh Espaņol/Spanish 4 06/08/2011 03:00 AM
mensaje de pickups! SeQualX Espaņol/Spanish 2 07/07/2010 11:36 PM


All times are GMT. The time now is 10:15 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.