Posts: 156
Threads: 12
Joined: Jan 2016
Quote:
Originally Posted by Sreyas
Sorry for double posting but i really found a thing.When i use my own custom iterator for player instead of the default one its working Ghost you should also try these whether its working for you or not:
PHP код:
#include <a_samp>
#include<foreach>
#include<zcmd>
#define FILTERSCRIPT
new Iterator:SS_Player<MAX_PLAYERS>;
public OnPlayerConnect(playerid)
{
Iter_Add(SS_Player,playerid);
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
Iter_Remove(SS_Player,playerid);
return 1;
}
public OnFilterScriptExit()
{
Iter_Clear(SS_Player);
return 1;
}
CMD:test(playerid)
{
new var,i;
printf("i before iterating = %d ",i);
printf("Contains %d", Iter_Count(Player));
foreach( i : SS_Player)
{
var++;
printf("iterating");
}
printf("i after complete iterations = %d var = %d ",i,var);
return 1;
}
|
OMG its now fucking working thanks! so this was the problem from default iterator?