Player ID Listed in TextDraw?
#1

Hello there! I am requesting help, as title says, about making a Textdraw enlisting player ids in it.

Код:
#include a-samp
#include foreach
#include sscanf2

#define TEAM_ZERO 0
#define TEAM_ONE 1

new Text:TextDraw[2],syncstring[512];

forward sync();

ModeInit()
{
SetTimer("sync",1000,true);
TeamTextDraw[0]=TextDrawCreate(coords,"_~n~");
TeamTextDraw[1]=TextDrawCreate(coords,"_~n~");
return 1;
}
public OnPlayerSpawn(....)
{
if(....)
{
SetPlayerTeam(playerid,TEAM_ZERO);
TextDrawShowForPlayer(playerid,TextDraw[0]);
}
else 
{
SetPlayerTeam(playerid,TEAM_ONE);
TextDrawShowForPlayer(playerid,TextDraw[1]);
}
return 1;
}
public sync()
{
foreach(Player,i)
{
if(GetPlayerTeam(i)==0)
{
format(syncstring,sizeof(syncstring),"TEAM ZERO IDS~n~%d~n~",i);
TextDrawSetString(TextDraw[0],syncstring);
}
else if(GetPlayerTeam(i)==1)
{
format(syncstring,sizeof(syncstring),"TEAM ONE IDS~n~%d~n~",i);
TextDrawSetString(TextDraw[1],syncstring);
}
return 1;
}
In the TextDraw will appear only ONE id and not everyones in that team!
Anyone please?

+REP
Reply


Messages In This Thread
Player ID Listed in TextDraw? - by kanerandyfirst - 20.09.2016, 13:44
Re: Player ID Listed in TextDraw? - by ReshiramZekrom - 20.09.2016, 16:00
Re: Player ID Listed in TextDraw? - by kanerandyfirst - 21.09.2016, 13:11
Re: Player ID Listed in TextDraw? - by ReshiramZekrom - 21.09.2016, 14:08
Re: Player ID Listed in TextDraw? - by kanerandyfirst - 21.09.2016, 14:11
Re: Player ID Listed in TextDraw? - by ReshiramZekrom - 21.09.2016, 14:20
Re: Player ID Listed in TextDraw? - by kanerandyfirst - 21.09.2016, 14:47
Re: Player ID Listed in TextDraw? - by ReshiramZekrom - 21.09.2016, 14:54
Re: Player ID Listed in TextDraw? - by kanerandyfirst - 21.09.2016, 15:30
Re: Player ID Listed in TextDraw? - by ReshiramZekrom - 21.09.2016, 18:31

Forum Jump:


Users browsing this thread: 1 Guest(s)