How need to make, name tags shows together.
#1

Hello so i have one issue, bat its not big deal. Bat i want to be better so me name tag doesn't shows together like

If your admin you have tag like this
[A]Player_Name:blablabla

If your vip its shows like this
[VIP]Player_Name:blablabla

So problem is, if i have admin and vip together its shows only one tag, that tag is admin so i only have [A] tag, bat i want shows them together
So its should be
[A][VIP]Player_Name:blablabla

Me code:
Код:
    if(pInfo[playerid][pAdminLevel] > 0)
    {
    format(string, sizeof(string), "{ff0000}(M) {%06x}%s {FFFFFF}[%i]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
    }
    else if(pInfo[playerid][pVipLevel] > 0)
    {
    format(string, sizeof(string), "{cc6600}(VIP) {%06x}%s {FFFFFF}[%i]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
    }
    else
    {
    format(string,sizeof(string),"{%06x}%s {FFFFFF}[%i]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
    }
    SendClientMessageToAll(GetPlayerColor(playerid), string);
    return 0;
}
Reply
#2

PHP код:
else if(pInfo[playerid][pAdminLevel] > && pInfo[playerid][pVipLevel] > 0) { //rest of code 
Reply
#3

^ Remember to put it as the first If statement, or else it won't work.
Reply
#4

Thanks its worked
Reply
#5

Glad it worked out well, though I'd like to point out what
PHP код:
&& 
means, because I guess you didn't/don't know what it means and does.
It basically means 'AND', so
PHP код:
variable1 &&(AND) variable2 
Reply
#6

Quote:
Originally Posted by saffierr
Посмотреть сообщение
It basically means 'AND'
Logical 'AND'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)