#1

PHP код:
public OnPlayerUpdate(playerid)
{
    if(
GetPlayerWeapon(playerid) == 38)
    {
        if(
InDM[playerid] == false && DMType[playerid] != 3)
        {
            new 
string[280];
               foreach(new 
Player)
            {
                
format(stringsizeof(string), "* %s (ID: %d) has a minigun outside the minigun game!"GetName(playerid), playerid);
                  new 
irc[280];
                
format(ircsizeof(irc), "1,3* Anti-Cheat Alert: %s (ID: %d) has a minigun outside the minigun game"GetName(playerid), playerid);
                
IRC_Say(groupIDIRC_CHANNELirc);
                
IRC_Say(groupIDIRC_aCHANNELirc);
                if(
pData[i][Admin] >= 1)
                {
                    
SendClientMessage(iCOLOR_REDstring);
                }
            }
        }
    }
    return 
1;

i tried to add anti-cheat i have got too many spam when the player have minigun
Reply
#2

add timer.
Reply
#3

Quote:
Originally Posted by Mugalito
Посмотреть сообщение
add timer.
Omg? Are you post hunting or something? i only see you add bullshit everywhere.
Why the heck would he need a timer?

This isn't the first post where you are doing this.

ontopic:
I think the problem is with onplayerupdate, i have had that spamming too and couldnt fix it.
You can check at onplayerkeystatechange, so it detects if the player uses the weapon.
PHP код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if(
newkeys KEY_FIRE)
    {
        if(
GetPlayerWeapon(playerid) == 38)
        {
            if(
InDM[playerid] == false && DMType[playerid] != 3)
            {
                new 
string[280];
                   foreach(new 
Player)
                {
                    
format(stringsizeof(string), "* %s (ID: %d) has a minigun outside the minigun game!"GetName(playerid), playerid);
                      new 
irc[280];
                    
format(ircsizeof(irc), "1,3* Anti-Cheat Alert: %s (ID: %d) has a minigun outside the minigun game"GetName(playerid), playerid);
                    
IRC_Say(groupIDIRC_CHANNELirc);
                    
IRC_Say(groupIDIRC_aCHANNELirc);
                    if(
pData[i][Admin] >= 1)
                    {
                        
SendClientMessage(iCOLOR_REDstring);
                    }
                }
            }
        }
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Omg? Are you post hunting or something? i only see you add bullshit everywhere.
Why the heck would he need a timer?

This isn't the first post where you are doing this.
it's a f7712ng OnPlayerUpdate callback, what should u do?
I'm scripting with Pawn from 2010 and I made a lot of codes, I cant even count and I know what the hell I'm talking.
Why none of my scripts have a bug or errors/warnings? cuz I know a sh1p(t)
Reply
#5

Quote:
Originally Posted by Mugalito
Посмотреть сообщение
it's a f7712ng OnPlayerUpdate callback, what should u do?
I'm scripting with Pawn from 2010 and I made a lot of codes, I cant even count and I know what the hell I'm talking.
Why none of my scripts have a bug or errors/warnings? cuz I know a sh1p(t)
Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Omg? Are you post hunting or something? i only see you add bullshit everywhere.
Why the heck would he need a timer?

This isn't the first post where you are doing this.

ontopic:
I think the problem is with onplayerupdate, i have had that spamming too and couldnt fix it.
You can check at onplayerkeystatechange, so it detects if the player uses the weapon.
PHP код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if(
newkeys KEY_FIRE)
    {
        if(
GetPlayerWeapon(playerid) == 38)
        {
            if(
InDM[playerid] == false && DMType[playerid] != 3)
            {
                new 
string[280];
                   foreach(new 
Player)
                {
                    
format(stringsizeof(string), "* %s (ID: %d) has a minigun outside the minigun game!"GetName(playerid), playerid);
                      new 
irc[280];
                    
format(ircsizeof(irc), "1,3* Anti-Cheat Alert: %s (ID: %d) has a minigun outside the minigun game"GetName(playerid), playerid);
                    
IRC_Say(groupIDIRC_CHANNELirc);
                    
IRC_Say(groupIDIRC_aCHANNELirc);
                    if(
pData[i][Admin] >= 1)
                    {
                        
SendClientMessage(iCOLOR_REDstring);
                    }
                }
            }
        }
    }
    return 
1;

thanks for you both, i have fixed it
Reply
#6

Quote:
Originally Posted by Mugalito
Посмотреть сообщение
it's a f7712ng OnPlayerUpdate callback, what should u do?
I'm scripting with Pawn from 2010 and I made a lot of codes, I cant even count and I know what the hell I'm talking.
Why none of my scripts have a bug or errors/warnings? cuz I know a sh1p(t)
You can be scripting from 10 years, I don't give a shit, this is a section where you need to explain, if you don't like it leave the hell out of here, we don't need dumbasses like you, you are probably one of the worst samp scripters ever, not cuz you don't have experience, cuz you don't have any common sense.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)