13.05.2015, 18:30
(
Последний раз редактировалось Su37Erich; 27.06.2015 в 18:24.
)
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:
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
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 ammun1, ammun2, ammun3, ammun4, ammunext;
public OnGameModeInit()
{
ammun1 = CreatePickup(1318, 1, 776.9510,1871.3682,4.9064, 0);
ammun2 = CreatePickup(1318, 1, 2159.5186,943.2205,10.8203, 0);
ammun3 = CreatePickup(1318, 1, -2625.8301,208.2361,4.8125, 0);
ammun4 = CreatePickup(1318, 1, 1368.7919,-1279.8047,13.5469, 0);
ammunext = CreatePickup(1318, 1, 189.5977,389.1773,2369.1978, -1);
new ac[4];
ac[0] = CreateActor(287, 180.6984,389.6265,2369.1978, 0.6876);
ac[1] = CreateActor(287, 180.6984,389.6265,2369.1978, 0.6876);
ac[2] = CreateActor(287, 180.6984,389.6265,2369.1978, 0.6876);
ac[3] = CreateActor(287, 180.6984,389.6265,2369.1978, 0.6876);
for(new i = 0; i<4; i++)
SetActorVirtualWorld(ac[i], i+1);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
c_NoLag{playerid} = true;
if(pickupid == ammun1)
{
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, 189.9007,390.7557,2369.1978);
SetPlayerFacingAngle(playerid, 3.2096);
Freeze(playerid, 2);
if(!UsingCheckpoint{playerid})
{
SetPlayerCheckpoint(playerid, 180.7750,391.9392,2369.1978, 1.0);
UsingCheckpoint{playerid} = true;
}
return 1;
}
else if(pickupid == ammun2)
{
SetPlayerVirtualWorld(playerid, 2);
SetPlayerPos(playerid, 189.9007,390.7557,2369.1978);
SetPlayerFacingAngle(playerid, 3.2096);
Freeze(playerid, 2);
if(!UsingCheckpoint{playerid})
{
SetPlayerCheckpoint(playerid, 180.7750,391.9392,2369.1978, 2.0);
UsingCheckpoint{playerid} = true;
}
return 1;
}
else if(pickupid == ammun3)
{
SetPlayerVirtualWorld(playerid, 3);
SetPlayerPos(playerid, 189.9007,390.7557,2369.1978);
SetPlayerFacingAngle(playerid, 3.2096);
Freeze(playerid, 2);
if(!UsingCheckpoint{playerid})
{
SetPlayerCheckpoint(playerid, 180.7750,391.9392,2369.1978, 2.0);
UsingCheckpoint{playerid} = true;
}
return 1;
}
else if(pickupid == ammun4)
{
SetPlayerVirtualWorld(playerid, 4);
SetPlayerPos(playerid, 189.9007,390.7557,2369.1978);
SetPlayerFacingAngle(playerid, 3.2096);
Freeze(playerid, 2);
if(!UsingCheckpoint{playerid})
{
SetPlayerCheckpoint(playerid, 180.7750,391.9392,2369.1978, 2.0);
UsingCheckpoint{playerid} = true;
}
return 1;
}
else if(pickupid == ammunext)
{
if(UsingCheckpoint{playerid})
{
DisablePlayerCheckpoint(playerid);
UsingCheckpoint{playerid} = false;
}
switch(GetPlayerVirtualWorld(playerid))
{
case 1:
{
SetPlayerPos(playerid, 779.0558,1871.3828,4.9065);
SetPlayerFacingAngle(playerid, 270.7944);
}
case 2:
{
SetPlayerPos(playerid, 2157.9485,942.6967,10.8203);
SetPlayerFacingAngle(playerid, 82.9382);
}
case 3:
{
SetPlayerPos(playerid, -2625.7686,209.9375,4.6193);
SetPlayerFacingAngle(playerid, 3.6187);
}
case 4:
{
SetPlayerPos(playerid, 1366.5967,-1279.7734,13.5469);
SetPlayerFacingAngle(playerid, 88.2195);
}
}
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
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