Making TAG Admin,Vip tag front the name without ONPLAYERTEXT
#1

Hello guys i had madded tag system in "OnPlayerText"
Bat its have couple bug like if i i get admin and i got infect msg just duplicate. Bat i know how to fix. So i don't wont use OnPlayerText callback and want ask you is it possible to make stock or idk what to detect is player admin or vip and put automatic tag front the name, without change original player color.
Reply
#2

Make this happen when for example an admin goes on duty using a particular command or smth,
make sure to delete the Text label after they disconnect or go off duty
Reply
#3

not text label i mean when player write something like this (A)(VIP)Name_Name(16): Test
This tag front name https://s12.postimg.org/syisrft1p/text.png so i ask is it possible make it without OnPlayerText callback and make stock or something who put automatic TAG
Reply
#4

No, it's not possible as far as I'm aware without using OnPlayerText. What bugs are you having when trying it with OnPlayerText though, maybe we can try and solve the issue for you as it shouldn't be that hard.
Reply
#5

you could possibly cancel the event then just use sendClientMessage?
Reply
#6

Well these bug are not really big i can fix it self, bat if its impossible then i have one question how i should GetPlayerColor cuz now i added some color with codes so its really boring every time put color codes and check how its luck so me question is how i should get player color and the put just a tag with different color cuz now me code luck like this
Код:
if(team[playerid] == TEAM_HUMAN)
	        {
	        GetPlayerName(playerid, name, sizeof(name));
	    	if(pInfo[playerid][AdminLevel] >= 1) format(stringbig, sizeof(stringbig), "{ffffff}[ {cc0033}A{ffffff} ]{66ccff}%s{ffffff}(%d): {FFFFFF}%s", name, playerid, text);
	    	else format(stringbig, sizeof(stringbig), "{66ccff}%s{ffffff}(%d): {ffffff}%s", name, playerid, text);
		    SendClientMessageToAll(playerid, stringbig);
	        }
Reply
#7

Up, how i should get player color without putting color codes. Show me on this code where i gave
Reply
#8

Up up up up.
Reply
#9

I have one problem i made me code with GetPlayerColor function and i got this bug with duplicate message.
https://s15.postimg.org/62nh57xtn/wtf.png
There me code
Код:
    new string[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    if(pInfo[playerid][pAdminLevel])
   	format(string,sizeof(string),"{993300}[ADMIN] {%06x}%s {FFFFFF}[%i]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
    else if(pInfo[playerid][pVipLevel])
    format(string,sizeof(string),"{FF6600}[DONATOR] {%06x}%s {FFFFFF}[%i]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
    else
    format(string,sizeof(string),"%s {FFFFFF}[%i]: {FFFFFF}%s", name, playerid, text);

    SendClientMessageToAll(GetPlayerColor(playerid), string);
    return 0;
}
Help guys fix this duplicate msg
Reply
#10

try this one
Код:
new string[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    if(pInfo[playerid][pAdminLevel])
   	format(string,sizeof(string),"{993300}[ADMIN] {%06x}%s {FFFFFF}[%i]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
    else if(pInfo[playerid][pVipLevel] && !pInfo[playerid][pAdminLevel])
    format(string,sizeof(string),"{FF6600}[DONATOR] {%06x}%s {FFFFFF}[%i]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
    else
    format(string,sizeof(string),"%s {FFFFFF}[%i]: {FFFFFF}%s", name, playerid, text);

    SendClientMessageToAll(GetPlayerColor(playerid), string);
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)