Posts: 347
Threads: 47
Joined: May 2015
Reputation:
0
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.
Posts: 1,076
Threads: 70
Joined: Jul 2016
Reputation:
0
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
Posts: 12
Threads: 0
Joined: Jul 2016
Reputation:
0
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.
Posts: 192
Threads: 37
Joined: Dec 2013
Reputation:
0
you could possibly cancel the event then just use sendClientMessage?
Posts: 347
Threads: 47
Joined: May 2015
Reputation:
0
Up, how i should get player color without putting color codes. Show me on this code where i gave
Posts: 383
Threads: 70
Joined: Feb 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;
}