Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Need help with 3dText

$
0
0
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 Code:

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.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>