08.06.2016, 23:03
їPara que creas label 2 si lo que vas a poner es en blanco?, no tiene sentido.
Usa el siguiente cуdigo:
Ojo: aсade Delete3DTextLabel(label1[playerid]); en el callback OnPlayerDisconnect para evitar bug's.
Quedando asн:
Usa el siguiente cуdigo:
Код:
switch(PlayerInfo[playerid][Level]) { case 1: { label1[playerid] = Create3DTextLabel("(Tester)", yellow,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4); } case 2: { label1[playerid] = Create3DTextLabel("(Co-Mod)", yellow,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4); } case 3: { label1[playerid] = Create3DTextLabel("(Moderator)", yellow,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4); } case 4: { label1[playerid] = Create3DTextLabel("(Admin)", yellow,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4); } case 5: { label1[playerid] = Create3DTextLabel("(Leader)", red,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4); } case 6: { label1[playerid] = Create3DTextLabel("(Manager/CEO)", red,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4); } }
Quedando asн:
Код:
public OnPlayerDisconnect(playerid, reason) { if(PlayerInfo[playerid][Level] > 0) Delete3DTextLabel(label1[playerid]); // resto del cуdigo. return 1; }