Problem to remove icon when do /adminduty
#1

Well i do /adminduty and i appear in the map(because im admin) and when i do /adminduty again to go off duty the icon keeps but in other color . How to remove the icon?

Quote:

if(!strcmp(cmdtext, "/adminduty", true)) // By Ellis
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmWarning: [ID:%d]%s goes on duty as admin", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
//for(new i = 0; i < sizeof(CarInfo); i++)
{
// SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid,);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmWarning: [ID:%d]%s goes off duty as admin", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You're not the admin !");
return 1;
}
}
return 1;
}

Reply
#2

When the admin goes on duty he will get the color:
TEAM_VAGOS_COLOR
To see which color is that search for the line
"#define TEAM_VAGOS_COLOR"
when he goes off-duty he gets color none because you wrote:
SetPlayerColor(playerid,);
I don't know what the result of this, but if you want to make him invisible then change this line to:
SetPlayerColor(playerid,0xffffff00);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)