Jump to content
  • 0

Comanda /refresh


Kata12

Question

4 answers to this question

Recommended Posts

1. Faci un callback: public RefreshPlayers().

2. Te duci la OnGameModeInit() si adaugi un timer: SetTimer("RefreshPlayers", 60000, 1);

3. adaugi:

public RefreshPlayers()

{

For(new i = 0, i < GetMaxPlayers(), i++)

{

if(IsPlayerConnected(i))

{

Aici pui comanda refresh

}

}

}

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

Sau poti face cu timer + CallRemoteFunction(params):

Cum s-a zis si mai sus, la OnGameModeInit() pui:

[pawn]

  SetTimer("RefreshPlayers", 60000, 1);

[/pawn]

apoi adaugi: (in afara oricarui public)

[pawn]

  public RefreshPlayers() {

  for(new c = 0; c < MAX_PLAYERS; c++)

      if(IsPlayerConnected©)

            // poti pune si un if(IsPlayerLogged©) sau cum ai tu functia

            CallRemoteFunction("OnPlayerCommandText", "is", c, "/refresh");

  return 1;

  }

[/pawn]

Teoretic, ar trebui sa mearga si asa.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.