20.09.2016, 13:44
Hello there! I am requesting help, as title says, about making a Textdraw enlisting player ids in it.
In the TextDraw will appear only ONE id and not everyones in that team!
Anyone please?
+REP
Код:
#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; }
Anyone please?
+REP