02.05.2012, 19:06
I got a small issue, my administrators on duty got a red ShowPlayerMarker which I don't want to exist, could you please tell me how to remove it etc. + Sometimes when they go off duty they recieve the CJ skin - Possible to fix aswell?
The only ShowPlayerMarker I could find in the whole gamemode.
pawn Код:
if(!strcmp(cmdtext, "/adminduty", true) || !strcmp(cmdtext, "/aduty", true)) // Original by LordMan, Modded 99% By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerColor(playerid,0xFF000099);
format(string, sizeof(string),"AdmCmd: %s is now on Admin Duty", sendername);
ABroadCast(COLOR_LIGHTRED, string, 1);
SendMessage(COLOR_LIGHTRED, string, 1);
DutyLabel[playerid] = Create3DTextLabel("Admin On Duty \n Do NOT Attack",0xFF000099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
if(PlayerInfo[playerid][pAdmin] >= 5)
{
for(new i = 0; i < sizeof(CarInfo); i++)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
if(PlayerInfo[playerid][pAdmin] >= 3)
{
SetPlayerColor(playerid,0xFF000099); // Administrator Duty Color.
SetPlayerSkin(playerid, 240);
new Float:AX,Float:AY,Float:AZ;
GetPlayerPos(playerid, AX,AY,AZ);
SafeSetPlayerPos(playerid, AX,AY,AZ+1);
UpdatePlayerPosition(playerid);
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
}
if(PlayerInfo[playerid][pAdmin] >= 6)
{
SaveGuns(playerid);
SafeResetPlayerWeapons(playerid);
SafeGivePlayerWeapon(playerid, 24, 10000);
}
return 1;
}
else if(PlayerInfo[playerid][pAdminDuty] == 1)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
if(Spectate[playerid] == 255)
{
SafeResetPlayerWeapons(playerid);
SetPlayerWeapons(playerid);
}
SetPlayerSkills(playerid);
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
Delete3DTextLabel(DutyLabel[playerid]);
PlayerInfo[playerid][pAdminDuty] = 0;
new originalskin = PlayerInfo[playerid][pChar];
SetPlayerSkin(playerid, originalskin);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
SafeSetPlayerPos(playerid, X,Y,Z+1);
SetPlayerToTeamColor(playerid);
format(string, sizeof(string),"AdmCmd: %s is now off Admin Duty", sendername);
ABroadCast(COLOR_LIGHTRED, string, 1);
SendMessage(COLOR_LIGHTED, string, 1);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /adminduty",d,m,y,h,mi,s,sendername);
AdminLog(string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "** You're not an admin !");
return 1;
}
}
return 1;
}
pawn Код:
public OnGameModeInit() // Do not add vehicles Above the next lines. - CuervO
{
ShowPlayerMarkers(2);