PDA

View Full Version : How need to make, name tags shows together.


Pokemon64
18/12/2016, 01:45 PM
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;
}

nezo2001
18/12/2016, 01:50 PM
else if(pInfo[playerid][pAdminLevel] > 0 && pInfo[playerid][pVipLevel] > 0) { //rest of code

Amads
18/12/2016, 01:53 PM
^ Remember to put it as the first If statement, or else it won't work.

Pokemon64
18/12/2016, 02:00 PM
Thanks its worked :)

saffierr
18/12/2016, 02:06 PM
Glad it worked out well, though I'd like to point out what && means, because I guess you didn't/don't know what it means and does.
It basically means 'AND', so variable1 &&(AND) variable2

SyS
18/12/2016, 02:07 PM
It basically means 'AND'

Logical 'AND'