3D Text Ranks [Help]
#4

Quote:
Originally Posted by Cypress
Посмотреть сообщение
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.
Hmm, fair enough. How can people help without the code. I'll post it below.

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);
      }
	}
OnPlayerDeath
Код:
	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);
The reason why I don't use it at OnPlayerConnect is for the reason, that let us consider a Player ranking from 1 suddenly changes to Rank 2, it will display 2 texts instead. That's why I delete them each time they die and reapply it at Spawn, so in a way it updates it but the problem is like I mentioned earlier. It works, but it won't display the tag of a killer, but it will only after he respawns..... I want it to display everytime, even when the victim has died and respawned, his killer's tag should be visible.... without the killer having to respawn in order for it to show....
Reply


Messages In This Thread
3D Text Ranks [Help] - by Sting. - 04.03.2018, 18:19
Re: 3D Text Ranks [Help] - by Cypress - 04.03.2018, 19:37
Re: 3D Text Ranks [Help] - by Sew_Sumi - 04.03.2018, 21:37
Re: 3D Text Ranks [Help] - by Sting. - 05.03.2018, 16:15
Re: 3D Text Ranks [Help] - by Cypress - 05.03.2018, 16:38
Re: 3D Text Ranks [Help] - by Sting. - 05.03.2018, 16:40
Re: 3D Text Ranks [Help] - by Sew_Sumi - 05.03.2018, 16:44
Re: 3D Text Ranks [Help] - by Sting. - 05.03.2018, 17:01

Forum Jump:


Users browsing this thread: 1 Guest(s)