24.10.2017, 21:09
Код:
public IsPlayerInSquadDisconnected(playerid) { if(commander[playerid] > 0) { commanders[commander[playerid]] = 100; activecoms[gTeam[playerid]] -= 1; DestroyDynamic3DTextLabel(comtext[playerid]); print("Êîìàíäèð ñíÿò ïðè îòêëþ÷åíèè!"); commander[playerid] = 0; Squads[numsquad[playerid]] -= 1; numsquad[playerid] = 0; print("Èãðîê óáðàí èç îòðÿäà!"); gTeam[playerid] = 3; print("Êîìàíäà èãðîêà îáíóëåíà!"); return 1; } else if((commander[playerid] == 0)&&(numsquad[playerid] > 0)) { if(IsValidDynamic3DTextLabel(comtext[commanders[numsquad[playerid]]])){Streamer_RemoveArrayData(STREAMER_TYPE_3D_TEXT_LABEL, comtext[commanders[numsquad[playerid]]], E_STREAMER_PLAYER_ID, playerid); print("Òåêñò êîìàíäèðà óäàëåí äëÿ èãðîêà!");} Squads[numsquad[playerid]] -= 1; numsquad[playerid] = 0; print("Èãðîê óáðàí èç îòðÿäà!"); gTeam[playerid] = 3; print("Êîìàíäà èãðîêà îáíóëåíà!"); return 1; } else { gTeam[playerid] = 3; print("Êîìàíäà èãðîêà îáíóëåíà!"); return 1; } }
Код:
if(IsValidDynamic3DTextLabel(comtext[commanders[numsquad[playerid]]])){Streamer_RemoveArrayData(STREAMER_TYPE_3D_TEXT_LABEL, comtext[commanders[numsquad[playerid]]], E_STREAMER_PLAYER_ID, playerid); print("Òåêñò êîìàíäèðà óäàëåí äëÿ èãðîêà!");}
Заранее благодарю