AdminOnDuty display at /admins
#2

Well, you can use something like this:

pawn Code:
stock AdminDuty(playerid)
{
    new AdminDuty[32];
    if(PlayerInfo[playerid][pAdminDuty] == 0) format(AdminDuty, sizeof(AdminDuty), "OffDuty");
    else if(PlayerInfo[playerid][pAdminDuty] == 1) format(AdminDuty, sizeof(AdminDuty), "OnDuty/ReadyToHelp");
    return AdminDuty;
}
And after writing that somewhere on your script, you go over the 'OnPlayerText' or wherever you want to use it and do this:

pawn Code:
format(string, sizeof(string), "[%s]: %s *[%s]*", atext, PlayerName(i), AdminDuty);
SendClientMessage(playerid, COLOR_WHITE, string);
This shall be fine.

Tell me if it works or either not.

EDIT: I saw this '[%s]: %s *[%s]*, atext', you're using text before name, are you sure about that? It's going to be like "Hello server: Private200 *[OnDuty]*". Change the places to fix it like this:

pawn Code:
format(string, sizeof(string), "[%s]: %s *[%s]*", PlayerName(i), atext, AdminDuty);
SendClientMessage(playerid, COLOR_WHITE, string);
Reply


Messages In This Thread
AdminOnDuty display at /admins - by Fell - 11.05.2013, 06:00
Re: AdminOnDuty display at /admins - by Private200 - 11.05.2013, 06:08
Re: AdminOnDuty display at /admins - by Fell - 11.05.2013, 06:16
Re: AdminOnDuty display at /admins - by Private200 - 11.05.2013, 06:26
Re: AdminOnDuty display at /admins - by Fell - 11.05.2013, 06:29
Re: AdminOnDuty display at /admins - by Private200 - 11.05.2013, 06:30
Re: AdminOnDuty display at /admins - by Fell - 11.05.2013, 06:37
Re: AdminOnDuty display at /admins - by Fell - 11.05.2013, 07:17
Re: AdminOnDuty display at /admins - by Private200 - 11.05.2013, 07:23
Re: AdminOnDuty display at /admins - by Fell - 11.05.2013, 07:59

Forum Jump:


Users browsing this thread: 2 Guest(s)