Nametags - Questions
#10

Quote:
Originally Posted by Jefff
Посмотреть сообщение
I know that i need create, but i dont have any clue how to do it simply ;d
Very Simple.

PHP код:
new tagToggle[MAX_PLAYERS]; //global variable
//code such as a command to turn the nametags on/off
if(tagToggle[playerid] == 1//off
{
    foreach(new 
Player)
    {
        
cNametag[i] = CreateDynamic3DTextLabel("Loading nametag..."0xFFFFFFFF0.00.00.1NT_DISTANCE, .attachedplayer i, .testlos 1);
    
tagToggle[i] = 0;
    }
}
else if(
tagToggle[playerid] == 0//on
{
    foreach(new 
Player)
    {
        
Delete3DTextLabel(cNametag[i]);
        
tagToggle[i] = 1;
    }

PHP код:
forward UpdateNametag();
public 
UpdateNametag()
{
    foreach(new 
Player)
    {
        if(
tagToggle[i] == 1) return 1;
        
//rest of the code after that....    
    

That is how you would do it, make sure under OnPlayerDisconnect, you set tagToggle[playerid] = 0;
Reply


Messages In This Thread
Nametags - Questions - by BrainDamaged - 12.07.2018, 20:22
Re: Nametags - Questions - by BrainDamaged - 13.07.2018, 08:22
Re: Nametags - Questions - by ItsRobinson - 13.07.2018, 19:09
Re: Nametags - Questions - by J0sh... - 13.07.2018, 19:15
Re: Nametags - Questions - by Jefff - 13.07.2018, 19:43
Re: Nametags - Questions - by ItsRobinson - 13.07.2018, 19:49
Re: Nametags - Questions - by Jefff - 13.07.2018, 20:06
Re: Nametags - Questions - by ItsRobinson - 13.07.2018, 20:29
Re: Nametags - Questions - by Jefff - 13.07.2018, 20:36
Re: Nametags - Questions - by ItsRobinson - 13.07.2018, 21:45

Forum Jump:


Users browsing this thread: 4 Guest(s)