06.12.2013, 19:16
I've been looking at some tutorials and I keep seeing this variable with an array pop up.
new (Name Of Variable)[MAX_PLAYERS];
Then they'd put "playerid" inside it. I'm almost positive this loops through all players connected but I still don't know how to use it in code. Can you give me some examples on how to use this kind of variable? Explanations would be helpful too; thanks!
Can you explain what this does too?
OnPlayerConnect(playerid)
{
AFKTime[playerid] = SetTimer("AFKCheck",1000,1);
}
new (Name Of Variable)[MAX_PLAYERS];
Then they'd put "playerid" inside it. I'm almost positive this loops through all players connected but I still don't know how to use it in code. Can you give me some examples on how to use this kind of variable? Explanations would be helpful too; thanks!
Can you explain what this does too?
OnPlayerConnect(playerid)
{
AFKTime[playerid] = SetTimer("AFKCheck",1000,1);
}