SA-MP Forums Archive
How need to make, name tags shows together. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How need to make, name tags shows together. (/showthread.php?tid=624546)



How need to make, name tags shows together. - Pokemon64 - 18.12.2016

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;
}



Re: How need to make, name tags shows together. - nezo2001 - 18.12.2016

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



Re: How need to make, name tags shows together. - Amads - 18.12.2016

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


Re: How need to make, name tags shows together. - Pokemon64 - 18.12.2016

Thanks its worked


Re: How need to make, name tags shows together. - saffierr - 18.12.2016

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 



Re: How need to make, name tags shows together. - SyS - 18.12.2016

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