Help me with this adminoffduty cmd please - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me with this adminoffduty cmd please (
/showthread.php?tid=122268)
Help me with this adminoffduty cmd please -
buonggiorno - 20.01.2010
Hi to all, i have cmd for admins that they can go onduty. when some admin go onduty his name become blue, and blue marker shown on map. That is ok and good, but...when admin go offduty, his name become white ( normal like all names ) but on radar he is marked with white color. What to edit in this cmd that when admin go offduty he disapire on radar, and become like all playres unvisable on radar?
here is cmd for admin on and off duty
Код:
if (strcmp(cmd,"/adminonduty",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new sMsg[ 128 ];
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
SetPlayerColor( playerid, COLOR_DBLUE );
SetPlayerHealth(playerid, 250);
SetPlayerArmour(playerid, 250);
format( sMsg, sizeof( sMsg ), "*Admin %s is onduty.", sMsg );
SendClientMessageToAll( COLOR_LIGHTGREEN, sMsg );
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " NOT ADMIN");
}
}
return 1;
}
if (strcmp(cmd,"/adminoffduty",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new sMsg[ 128 ];
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
format( sMsg, sizeof( sMsg ), "*Admin %s is offduty.", sMsg );
SendClientMessageToAll( COLOR_LIGHTRED, sMsg );
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " NOT ADMIN");
}
}
return 1;
}
What to edit?
Re: Help me with this adminoffduty cmd please -
John Rockie - 21.01.2010
Looks right too me, does it work or errors? whats the matter
Re: Help me with this adminoffduty cmd please -
buonggiorno - 20.02.2010
Problem is that when admin type /adminoffduty he is still marked on radar but not with blue color like he is ondutym, now he is market white color...i want that he type /adminonduty that he disapeare from radar and players cant see his positions...hot to do this?