toggleplayercontrallable and repeats
#1

The purpose of this script is to warn the user that their ping exceeds the maximum amount and freezes the player until their ping calms down... but that hasn't got quit the way I expected it too.

Why does it keep freezing, freezing, freezing them? I just want it to freeze the player once.
Why does it keep unfreezing, unfreezing, unfreezing them? I just want it to unfreeze the player once.



(You can see this when the text 'true/false' repeats)

PHP код:
#include <a_samp>
#define FILTERSCRIPT
#define MAX_PING 15
public OnPlayerUpdate(playerid) {
if (
GetPlayerPing(playerid) < MAX_PING)
      {
              
TogglePlayerControllable(playerid0); //true/freeze
              
SendClientMessage(playerid, -1"true");
      }
      
      else if (
GetPlayerPing(playerid) > MAX_PING)
      {
          
TogglePlayerControllable(playerid1); //false/unfreeze
          
SendClientMessage(playerid, -1"false");
      }
      

Can someone improve the script (help me)?
Reply


Messages In This Thread
toggleplayercontrallable and repeats - by billy1337samp - 03.11.2017, 21:02
Re: toggleplayercontrallable and repeats - by billy1337samp - 04.11.2017, 13:39
Re: toggleplayercontrallable and repeats - by Arbico - 04.11.2017, 13:45
Re: toggleplayercontrallable and repeats - by frouzen - 04.11.2017, 13:56
Re: toggleplayercontrallable and repeats - by billy1337samp - 04.11.2017, 14:10
Re: toggleplayercontrallable and repeats - by billy1337samp - 04.11.2017, 14:12
Re: toggleplayercontrallable and repeats - by frouzen - 04.11.2017, 14:20
Re: toggleplayercontrallable and repeats - by billy1337samp - 04.11.2017, 14:41

Forum Jump:


Users browsing this thread: 1 Guest(s)