how to stop the sa-mp server from syncing weapons and onfoot sync (rates)
#1

IDK, if the topic says it right.

But how can I disable weapon and onfoot syncing? to make the server only sync vehicles..

like change weapon_rate to -1 in server.cfg or something? (what will -1 do?)

if I stop weapon and onfoot syncing,(removing bandwidth usage) and increase vehicle rate, will it be much smoother?
Reply
#2

Weapon_rate is the minimum time in milliseconds a client updates the server data of it. The answer of your question depends on your Server Host.
Reply
#3

yes I know.. I don't want the client / server to update it <.<... isn't that just wasting resources if you COMPLETELY don't need/use weapons?
Reply
#4

Quote:
Originally Posted by Kar
Посмотреть сообщение
yes I know.. I don't want the client / server to update it <.<... isn't that just wasting resources if you COMPLETELY don't need/use weapons?
Could desync some packets ?
Reply
#5

Try to set sync time to 99999999999 or something? :P
Reply
#6

Try this maybe?

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid))
    {
        SetPlayerArmedWeapon(playerid, 0);
        return 0;
    }
    if(!IsPlayerInAnyVehicle(playerid))
    {
        return 0;
    }
    return 1;
}
Fact: Returning zero under OnPlayerUpdate will halt the sync, if the 'if' expression above is true.
Reply
#7

I think he's saying that he doesn't ever give players weapons, so wants to disable sync for them.
Reply
#8

Quote:
Originally Posted by MP2
Посмотреть сообщение
I think he's saying that he doesn't ever give players weapons, so wants to disable sync for them.
If that is so, it'd be totally useless. No weapons mean that weapon data never needs to get synchronized.

You could try setting it do 0, then test it with a friend.
Reply
#9

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Try this maybe?

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid))
    {
        SetPlayerArmedWeapon(playerid, 0);
        return 0;
    }
    if(!IsPlayerInAnyVehicle(playerid))
    {
        return 0;
    }
    return 1;
}
Fact: Returning zero under OnPlayerUpdate will halt the sync, if the 'if' expression above is true.
I don't know anything about PAWN, but I have knowledge of other scripting languages. I've got a question on your script, and that question is also on-topic for the thread itself:

If you stop syncing when the player isn't in a vehicle (I assume "if(!IsPlayerInAnyVehicle(playerid))" does that), then how will the server know the player entered a vehicle again? It stopped sync'ing...

Correct me if I'm wrong...or just give out a general facepalm
Reply
#10

Yea, using OnPlayerUpdate is not a good idea, because the player will never get weapons or be out of the vehicle right... (unless they hack)

so basically instead of making a anti-cheat for that, and wasting the server resources, why not just.. stop the sync?

And setting it to a large number like 99999999, wouldn't that mean the server will have to count each ms still? just wondering.. it's not a problem but I'll do it.

I'll try 0 also
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)