02.04.2010, 00:06
ok ppl i fixed and solved it!!
i made it like
dam the forum screwd the code ahh nvm its it ok to show -.- but THX FOR THE TIPS!! (can be closed now)
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;
}