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