messagelimit and pickups?
#1

Hello,
I don't know what are happening with the actors or pickups(maybe) or my script that I think is right, because everytime a player pick up a pickup got banned (It's an arrow that teleport you to a custom ammun nation, that has an Actor). I revised the logs and I found the following: [warning] client exceeded 'messageslimit' *.*.213.227:51634 (535) Limit: 500/sec
The others pickups work fine, the problem only happens in the pickups that teleport you to the custom ammun nation, you pick up it and you don't get teleported, you get banned after some time (at first it works fine, but after sometime it started to "ban" players)
http://*********/LWMbD26VqpQ
Here is my script:
PHP код:
new ammun1ammun2ammun3ammun4ammunext;
public 
OnGameModeInit()
{
ammun1 CreatePickup(13181776.9510,1871.3682,4.90640);
    
ammun2 CreatePickup(131812159.5186,943.2205,10.82030);
    
ammun3 CreatePickup(13181, -2625.8301,208.2361,4.81250);
    
ammun4 CreatePickup(131811368.7919,-1279.8047,13.54690);
    
ammunext CreatePickup(13181189.5977,389.1773,2369.1978, -1);
new 
ac[4];
    
ac[0] = CreateActor(287180.6984,389.6265,2369.19780.6876);
    
ac[1] = CreateActor(287180.6984,389.6265,2369.19780.6876);
    
ac[2] = CreateActor(287180.6984,389.6265,2369.19780.6876);
    
ac[3] = CreateActor(287180.6984,389.6265,2369.19780.6876);
for(new 
0i<4i++)
        
SetActorVirtualWorld(ac[i], i+1);
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    
c_NoLag{playerid} = true;
    if(
pickupid == ammun1)
    {
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerPos(playerid189.9007,390.7557,2369.1978);
        
SetPlayerFacingAngle(playerid3.2096);
        
Freeze(playerid2);
        if(!
UsingCheckpoint{playerid})
        {
            
SetPlayerCheckpoint(playerid180.7750,391.9392,2369.19781.0);
            
UsingCheckpoint{playerid} = true;
        }
        return 
1;
    }
    else if(
pickupid == ammun2)
    {
        
SetPlayerVirtualWorld(playerid2);
        
SetPlayerPos(playerid189.9007,390.7557,2369.1978);
        
SetPlayerFacingAngle(playerid3.2096);
        
Freeze(playerid2);
        if(!
UsingCheckpoint{playerid})
        {
            
SetPlayerCheckpoint(playerid180.7750,391.9392,2369.19782.0);
            
UsingCheckpoint{playerid} = true;
        }
        return 
1;
    }
    else if(
pickupid == ammun3)
    {
        
SetPlayerVirtualWorld(playerid3);
        
SetPlayerPos(playerid189.9007,390.7557,2369.1978);
        
SetPlayerFacingAngle(playerid3.2096);
        
Freeze(playerid2);
        if(!
UsingCheckpoint{playerid})
        {
            
SetPlayerCheckpoint(playerid180.7750,391.9392,2369.19782.0);
            
UsingCheckpoint{playerid} = true;
        }
        return 
1;
    }
    else if(
pickupid == ammun4)
    {
        
SetPlayerVirtualWorld(playerid4);
        
SetPlayerPos(playerid189.9007,390.7557,2369.1978);
        
SetPlayerFacingAngle(playerid3.2096);
        
Freeze(playerid2);
        if(!
UsingCheckpoint{playerid})
        {
            
SetPlayerCheckpoint(playerid180.7750,391.9392,2369.19782.0);
            
UsingCheckpoint{playerid} = true;
        }
        return 
1;
    }
    else if(
pickupid == ammunext)
    {
        if(
UsingCheckpoint{playerid})
        {
            
DisablePlayerCheckpoint(playerid);
            
UsingCheckpoint{playerid} = false;
        }
        switch(
GetPlayerVirtualWorld(playerid))
        {
            case 
1:
            {
                
SetPlayerPos(playerid779.0558,1871.3828,4.9065);
                
SetPlayerFacingAngle(playerid270.7944);
            }
            case 
2:
            {
                
SetPlayerPos(playerid2157.9485,942.6967,10.8203);
                
SetPlayerFacingAngle(playerid82.9382);
            }
            case 
3:
            {
                
SetPlayerPos(playerid, -2625.7686,209.9375,4.6193);
                
SetPlayerFacingAngle(playerid3.6187);
            }
            case 
4:
            {
                
SetPlayerPos(playerid1366.5967,-1279.7734,13.5469);
                
SetPlayerFacingAngle(playerid88.2195);
            }
                
        }
        
SetPlayerVirtualWorld(playerid0);
        return 
1;
    } 
I showed you above the part when the bug comes, when you pickup an arrow, all other scripts inside OnPlayerPickUpPickup work fine, so what is happening?
Freeze function works fine, variable c_NoLag works fine
I'm sorry if this is the wrong section, but my script looks right, isn't it?
I can't understand it
Reply


Messages In This Thread
messagelimit and pickups? - by Su37Erich - 13.05.2015, 18:30
Re: messagelimit and pickups? - by Su37Erich - 26.05.2015, 02:36
Re: messagelimit and pickups? - by Su37Erich - 27.06.2015, 18:25
Re: messagelimit and pickups? - by Su37Erich - 10.07.2015, 03:19

Forum Jump:


Users browsing this thread: 1 Guest(s)