20.01.2018, 12:19
(
Последний раз редактировалось Sanady; 20.01.2018 в 12:49.
)
Hello, my current issue is that when I spawn for the first time textdraw appears, from 0 to 31, but when I die and respawn only textdraw with ID 0 is not showed, I don`t understand why, I did debug on whole for loop which is showing my textdraws and it was correct without any bug... Here is the code:
Here is log print:
But textdraw with ID 0 is still not showing, here is OnPlayerSpawn callback:
PHP код:
stock ShowGraphicalUserInterface(playerid)
{
for(new i = 0; i < 32; i++)
{
PlayerTextDrawShow(playerid, GUI[playerid][i]);
printf("i:%d", i);
}
return 1;
}
Код:
[12:37:53] i:0 [12:37:53] i:1 [12:37:53] i:2 [12:37:53] i:3 [12:37:53] i:4 [12:37:53] i:5 [12:37:53] i:6 [12:37:53] i:7 [12:37:53] i:8 [12:37:53] i:9 [12:37:53] i:10 [12:37:53] i:11 [12:37:53] i:12 [12:37:53] i:13 [12:37:53] i:14 [12:37:53] i:15 [12:37:53] i:16 [12:37:53] i:17 [12:37:53] i:18 [12:37:53] i:19 [12:37:53] i:20 [12:37:53] i:21 [12:37:53] i:22 [12:37:53] i:23 [12:37:53] i:24 [12:37:53] i:25 [12:37:53] i:26 [12:37:53] i:27 [12:37:53] i:28 [12:37:53] i:29 [12:37:53] i:30 [12:37:53] i:31
PHP код:
public OnPlayerSpawn(playerid)
{
DestroyTeamSelectionTD(playerid);
SetPlayerColor(playerid,TeamInfo[pTeam[playerid]][TeamColor]);
if(pClass[playerid] == INVALID_CLASS) ShowClassDialog(playerid);
else
{
ShowGraphicalUserInterface(playerid);
GiveClassWeapons(playerid);
}
if(pInfo[playerid][pVip] == 1) SetPlayerArmour(playerid, 100);
else SetPlayerArmour(playerid, 50);
return 1;
}