Mark on minimap (/aduty) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mark on minimap (/aduty) (
/showthread.php?tid=436388)
Mark on minimap (/aduty) -
NekoChan - 11.05.2013
How do i remove admin's mark on minimap when after using command "/aduty" ?
- Need help guys
Re: Mark on minimap (/aduty) -
MattyG - 11.05.2013
Just use DisablePlayerCheckpoint:
https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
Re: Mark on minimap (/aduty) -
seanny - 11.05.2013
Can you show us your command first?
Re : Mark on minimap (/aduty) -
Rayan_black - 11.05.2013
Just add this line to your command
pawn Код:
DisablePlayerCheckpoint(playerid)
Re: Mark on minimap (/aduty) -
NekoChan - 11.05.2013
This is the command
pawn Код:
CMD:aduty(playerid,params[])
new string[128];
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_WHITE,"You're not an admin!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
format(string,sizeof(string),"%s has just went on Admin Duty",GetName(playerid));
SendClientMessageToAll(COLOR_GREEN,string);
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
SetPlayerColor(playerid,COLOR_TWRED);
PlayerInfo[playerid][pAdminDuty] = 1;
adminlabel[playerid] = Create3DTextLabel("Admin on duty\n Do Not Attack!", COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(adminlabel[playerid], playerid, 0.0, 0.0, 0.7);
}
else
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
format(string,sizeof(string),"%s has just went off Admin Duty",GetName(playerid));
SendClientMessageToAll(COLOR_RED,string);
PlayerInfo[playerid][pAdminDuty] = 0;
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_WHITE);
SetPlayerHealth(playerid,0);
ForceClassSelection(playerid);
Delete3DTextLabel(adminlabel[playerid]);
}
return 1;
}
Re : Mark on minimap (/aduty) -
Rayan_black - 11.05.2013
pawn Код:
CMD:aduty(playerid,params[])
new string[128];
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_WHITE,"You're not an admin!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
format(string,sizeof(string),"%s has just went on Admin Duty",GetName(playerid));
SendClientMessageToAll(COLOR_GREEN,string);
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
SetPlayerColor(playerid,COLOR_TWRED);
DisablePlayerCheckpoint(playerid)
PlayerInfo[playerid][pAdminDuty] = 1;
adminlabel[playerid] = Create3DTextLabel("Admin on duty\n Do Not Attack!", COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(adminlabel[playerid], playerid, 0.0, 0.0, 0.7);
}
else
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
format(string,sizeof(string),"%s has just went off Admin Duty",GetName(playerid));
SendClientMessageToAll(COLOR_RED,string);
PlayerInfo[playerid][pAdminDuty] = 0;
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_WHITE);
SetPlayerHealth(playerid,0);
ForceClassSelection(playerid);
Delete3DTextLabel(adminlabel[playerid]);
}
return 1;
}
This should do the work.