05.03.2018, 16:15
Quote:
What's wrong with creating 3D text on connect and showing it on spawn? Should be a lot easier than to delete and create them each time. Plus without code, nobody can guess why that's happening.
|
OnPlayerSpawn
Код:
if(GetPlayerScore(playerid) > 12000) { if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9 || GetPlayerTeam(playerid) == 13) { SetPlayerWantedLevel(playerid, 6); TextDrawShowForPlayer(playerid, Level 6 (Cops)); level6 = Create3DTextLabel("Level 6 (Cops)", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level6, playerid, 0.0, 0.0, 0.5); } else { SetPlayerWantedLevel(playerid, 6); TextDrawShowForPlayer(playerid, Level 6); level6i = Create3DTextLabel("Level 6", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level6i, playerid, 0.0, 0.0, 0.5); } } else if(GetPlayerScore(playerid) > 8000) { if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9 || GetPlayerTeam(playerid) == 13) { SetPlayerWantedLevel(playerid, 5); TextDrawShowForPlayer(playerid, Level 5 (Cops)); level5= Create3DTextLabel("Level 5 (Cops)", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level5, playerid, 0.0, 0.0, 0.5); } else { SetPlayerWantedLevel(playerid, 5); TextDrawShowForPlayer(playerid, Level5); level5i = Create3DTextLabel("Level5", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level5i, playerid, 0.0, 0.0, 0.5); } } else if(GetPlayerScore(playerid) > 6500) { if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9 || GetPlayerTeam(playerid) == 13) { SetPlayerWantedLevel(playerid, 4); TextDrawShowForPlayer(playerid, Level4(Cops)); level4= Create3DTextLabel("Level 4(Cops)", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level4, playerid, 0.0, 0.0, 0.5); } else { SetPlayerWantedLevel(playerid, 4); TextDrawShowForPlayer(playerid, Level4); level4i= Create3DTextLabel("Level4", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level4i, playerid, 0.0, 0.0, 0.5); } } else if(GetPlayerScore(playerid) > 3500) { if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9 || GetPlayerTeam(playerid) == 13) { SetPlayerWantedLevel(playerid, 3); TextDrawShowForPlayer(playerid, Level3(Cops)); level3= Create3DTextLabel("Level3(Cops)", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level3, playerid, 0.0, 0.0, 0.5); } else { SetPlayerWantedLevel(playerid, 3); TextDrawShowForPlayer(playerid, Level3); level3i= Create3DTextLabel("Level3", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level3i, playerid, 0.0, 0.0, 0.5); } } else if(GetPlayerScore(playerid) > 1500) { if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9 || GetPlayerTeam(playerid) == 13) { SetPlayerWantedLevel(playerid, 2); TextDrawShowForPlayer(playerid, Level2(Cops)); level2= Create3DTextLabel("Level2(Cops)", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level2, playerid, 0.0, 0.0, 0.5); } else { SetPlayerWantedLevel(playerid, 2); TextDrawShowForPlayer(playerid, Level2); level2i= Create3DTextLabel("Level2", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level2i, playerid, 0.0, 0.0, 0.5); } } else if(GetPlayerScore(playerid) > 500) { if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9 || GetPlayerTeam(playerid) == 13) { SetPlayerWantedLevel(playerid, 1); TextDrawShowForPlayer(playerid, Level1(Cops)); level1= Create3DTextLabel("Level1(Cops)", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level1, playerid, 0.0, 0.0, 0.5); } else { SetPlayerWantedLevel(playerid, 1); TextDrawShowForPlayer(playerid, Level1); level1i= Create3DTextLabel("Level1", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level1i, playerid, 0.0, 0.0, 0.5); } } else { if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9 || GetPlayerTeam(playerid) == 13) { TextDrawShowForPlayer(playerid, Level0(Cops)); SetPlayerWantedLevel(playerid, 0); level0= Create3DTextLabel("Level 0(Cops)", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level0, playerid, 0.0, 0.0, 0.5); } else { TextDrawShowForPlayer(playerid, Level0); SetPlayerWantedLevel(playerid, 0); level0i= Create3DTextLabel("Level0", GetPlayerColor(playerid) , 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(level0i, playerid, 0.0, 0.0, 0.5); } }
Код:
Delete3DTextLabel(Text3D:level0); Delete3DTextLabel(Text3D:level1); Delete3DTextLabel(Text3D:level2); Delete3DTextLabel(Text3D:level3); Delete3DTextLabel(Text3D:level4); Delete3DTextLabel(Text3D:level5); Delete3DTextLabel(Text3D:level6); Delete3DTextLabel(Text3D:level0i); Delete3DTextLabel(Text3D:level1i); Delete3DTextLabel(Text3D:level2i); Delete3DTextLabel(Text3D:level3i); Delete3DTextLabel(Text3D:level4i); Delete3DTextLabel(Text3D:level5i); Delete3DTextLabel(Text3D:level6i);