CMD:aduty(playerid, params[])
{
new string[128], file[32];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid])
{
format(string, sizeof(string), "AdmWarn: %s has gone on admin duty.", RPN(playerid));
SendAdminMessage(COLOR_GREEN, 1, string);
aDuty[playerid] = 1;
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
format(string, sizeof(string), "%s", RPALN(playerid));
SetPlayerArmour(playerid, 9999999);
SetPlayerHealth(playerid, 9999999);
SetPlayerColor(playerid,0xAA3333FF);
}
else
{
if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone.");
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
aDuty[playerid] = 0;
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
format(string, sizeof(string), "AdmWarn: %s has gone off admin duty.", RPN(playerid));
SendAdminMessage(COLOR_DARKRED, 1, string);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
//Delete3DTextLabel(aDutyText[playerid]);
SetPlayerColor(playerid, TRANSPARENT_WHITE);
}
return 1;
}
CMD:aduty(playerid, params[])
{
new string[128], file[32];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid])
{
format(string, sizeof(string), "AdmWarn: %s has gone on admin duty.", RPN(playerid));
SendAdminMessage(COLOR_GREEN, 1, string);
aDuty[playerid] = 1;
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
format(string, sizeof(string), "%s", RPALN(playerid));
SetPlayerArmour(playerid, 9999999);
SetPlayerHealth(playerid, 9999999);
SetPlayerColor(playerid,0xAA3333FF);
RemovePlayerMapIcon(i, 99);
}
else
{
if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone.");
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
aDuty[playerid] = 0;
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
format(string, sizeof(string), "AdmWarn: %s has gone off admin duty.", RPN(playerid));
SendAdminMessage(COLOR_DARKRED, 1, string);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
//Delete3DTextLabel(aDutyText[playerid]);
SetPlayerColor(playerid, TRANSPARENT_WHITE);
}
return 1;
}
|
I've been messing around with it but i never tested it yet but i added another line, Could someone tell me if i did it correctly or you can't actully do this since i added ''RemovePlayerMapIcon(i, 99);'' under the players color when they /aduty
Код:
CMD:aduty(playerid, params[])
{
new string[128], file[32];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid])
{
format(string, sizeof(string), "AdmWarn: %s has gone on admin duty.", RPN(playerid));
SendAdminMessage(COLOR_GREEN, 1, string);
aDuty[playerid] = 1;
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
format(string, sizeof(string), "%s", RPALN(playerid));
SetPlayerArmour(playerid, 9999999);
SetPlayerHealth(playerid, 9999999);
SetPlayerColor(playerid,0xAA3333FF);
RemovePlayerMapIcon(i, 99);
}
else
{
if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone.");
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
aDuty[playerid] = 0;
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
format(string, sizeof(string), "AdmWarn: %s has gone off admin duty.", RPN(playerid));
SendAdminMessage(COLOR_DARKRED, 1, string);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
//Delete3DTextLabel(aDutyText[playerid]);
SetPlayerColor(playerid, TRANSPARENT_WHITE);
}
return 1;
}
|
CMD:aduty(playerid, params[])
{
new string[128], file[32];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid])
{
format(string, sizeof(string), "AdmWarn: %s has gone on admin duty.", RPN(playerid));
SendAdminMessage(COLOR_GREEN, 1, string);
aDuty[playerid] = 1;
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
format(string, sizeof(string), "%s", RPALN(playerid));
SetPlayerArmour(playerid, 9999999);
SetPlayerHealth(playerid, 9999999);
SetPlayerColor(playerid,0xAA3333FF);
RemovePlayerMapIcon(i, 99);
}
else
{
if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone.");
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
aDuty[playerid] = 0;
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
format(string, sizeof(string), "AdmWarn: %s has gone off admin duty.", RPN(playerid));
SendAdminMessage(COLOR_DARKRED, 1, string);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
//Delete3DTextLabel(aDutyText[playerid]);
SetPlayerColor(playerid, TRANSPARENT_WHITE);
}
return 1;
}
|
When you say map icon, are you talking about map icons (SetPlayerMapIcon - look on the wiki) or the player blips?
|
public OnGameModeInit()
{
CheckFiles();
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
EnableStuntBonusForAll(0);
DisableInteriorEnterExits();
ShowPlayerMarkers(1);
ShowPlayerMarkers(1);
ShowPlayerMarkers(0);