[SOLVED/FIXED] GMX Issue
#8

ok ppl i fixed and solved it!!

i made it like

pawn Code:
new ongmx[MAX_PLAYERS]; //somwhere aboove
...

public OnPlayerDisconnect(playerid, reason)
{
...
    if (ongmx[playerid] != 1) {OnPlayerUpdate(playerid);}
...
}
...
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    cmd = strtok(cmdtext, idx);

    if(strcmp(cmd, "/gmx", true) == 0)
    {
      new countpl;
      for(new i = 0; i < MAX_PLAYERS; i++)
        {
           new Float:X, Float:Y, Float:Z;
           if(IsPlayerConnected(i))
           {
               GetPlayerPos(i, X, Y, Z)
               PlayerInfo[playerid][pPos_x] = X;
               PlayerInfo[playerid][pPos_y] = Y;
               PlayerInfo[playerid][pPos_z] = Z;
 
               OnPlayerUpdate(i);
               countpl += 1;
               ongmx[playerid] = 1;
             }
        }
        new givemsg[128];
        format(givemsg, sizeof(givemsg),"%i Users Updated", countpl)
        SendClientMessage(playerid,COLOR_BLUE, givemsg);
       
        SetTimer("GameModeExitFunc", 5000, 0);
        return 1;
    }
...
return 1;
}
dam the forum screwd the code ahh nvm its it ok to show -.- but THX FOR THE TIPS!! (can be closed now)
Reply


Messages In This Thread
[SOLVED/FIXED] GMX Issue - by n4pkill - 30.03.2010, 09:51
Re: GMX Issue - by Faraday - 30.03.2010, 09:53
Re: GMX Issue - by n4pkill - 30.03.2010, 09:56
Re: GMX Issue - by n4pkill - 01.04.2010, 00:12
Re: GMX Issue - by CJ101 - 01.04.2010, 00:14
Re: GMX Issue - by bpeterson - 01.04.2010, 09:28
Re: GMX Issue - by Last_Stand_Guardian - 01.04.2010, 09:42
Re: GMX Issue - by n4pkill - 02.04.2010, 00:06

Forum Jump:


Users browsing this thread: 1 Guest(s)