Need help with 3dText
#1

I need this command where if a player types: /channel 1 it displays "Channel: 1" above their head, if they type channel 2 it displays "Channel: 2" above their head and so on..
If the player already has "Channel 1" displayed above their head and the player decides to switch to /channel 2 it has to change to "Channel 2"
I've been trying all day to get this to work but I cannot manage to get it done, here is what I have:
PHP код:
CMD:channel(playerid,params[])
{
    if(
isnull(params)) return SendClientMessage(playeridCOLOR_GREY"/channel (Channel ID)");
    {
    if(!
strcmp(params"1"true7))
    {
    
Channel1[playerid] = Create3DTextLabel("Channel: 1"0xE91616FF0001701);
    
Attach3DTextLabelToPlayer(Channel1[playerid], playerid0.00.00.275);
    
PlayerGlobalMessage(playerid,20.0"Has switched to channel 1.");
    }
    else if(!
strcmp(params"2"true7))
    {
    
Channel2[playerid] = Create3DTextLabel("Channel: 2"0xE91616FF0001701);
    
Attach3DTextLabelToPlayer(Channel2[playerid], playerid0.00.00.275);
    
PlayerGlobalMessage(playerid,20.0"Has switched to channel 2.");
    
Delete3DTextLabel(Channel1[playerid]);
    }
    }
    return 
1;

I don't know if this is anywhere close to what it's supposed to be but I don't know..
If you can help me that'd be great. Thanks in advance.
Reply


Messages In This Thread
Need help with 3dText - by Cubie - 19.09.2017, 17:04
Re: Need help with 3dText - by Kraeror - 19.09.2017, 17:11
Re: Need help with 3dText - by Cubie - 19.09.2017, 17:23
Re: Need help with 3dText - by Kraeror - 19.09.2017, 17:33
Re: Need help with 3dText - by Cubie - 19.09.2017, 17:41
Re: Need help with 3dText - by Cubie - 20.09.2017, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)