SA-MP Forums Archive
Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - 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: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT (/showthread.php?tid=619788)



Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - henkas - 22.10.2016

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.


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - Eoussama - 22.10.2016

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


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - henkas - 22.10.2016

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


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - Duco - 22.10.2016

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.


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - MrViolence101 - 22.10.2016

you could possibly cancel the event then just use sendClientMessage?


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - henkas - 22.10.2016

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



Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - henkas - 23.10.2016

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


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - henkas - 24.10.2016

Up up up up.


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - henkas - 24.10.2016

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


Re: Making TAG Admin,Vip tag front the name without ONPLAYERTEXT - ThatFag - 24.10.2016

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