Help with Duty [REP ++]
#1

Код:
if (strcmp(cmd,"/on",true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			        new sMsg[ 128 ];
                	GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
                	SetPlayerColor(playerid, ZELENKASTA);
                	SetPlayerArmour(playerid, 10000.0);
					SetPlayerHealth(playerid, 10000.0);
                	format( sMsg, sizeof( sMsg ), "(DC)Admin %s e na dolznost.", sMsg );
                	SendClientMessageToAll(COLOR_LIGHTRED, sMsg);
                	AdminDuty[playerid] = 1;
			}
	   }
And now how to make to player when go off duty this cmd

Код:
	if (strcmp(cmd,"/off",true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			        new sMsg[ 128 ];
                	GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
                	SetPlayerColor(playerid,TEAM_HIT_COLOR);
                	SetPlayerHealth(playerid, 60);
		        	SetPlayerArmour(playerid, 0);
                	format( sMsg, sizeof( sMsg ), "(DC)Admin %s vekje ne e na dolznost.", sMsg );
                	SendClientMessageToAll(COLOR_LIGHTRED, sMsg);
                	AdminDuty[playerid] = 0;
				}
			}
And now how to make it when player go /off duty to hide on map ? Becouse on that script when i go /off im showing on map Yellowed please help me how to hide player when he go /off

[REP ++]
Reply
#2

You want to hide the player from map when they go /off ? Then I think it will be:

pawn Код:
SetPlayerColor(playerid, 00);
Not sure.
Reply
#3

Yeah, do this for your /off command:

Код:
if (strcmp(cmd,"/off",true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			        new sMsg[ 128 ];
                	GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
                	SetPlayerColor(playerid,0xFFFFFF00); // Color invisible
                	SetPlayerHealth(playerid, 60);
		        	SetPlayerArmour(playerid, 0);
                	format( sMsg, sizeof( sMsg ), "(DC)Admin %s vekje ne e na dolznost.", sMsg );
                	SendClientMessageToAll(COLOR_LIGHTRED, sMsg);
                	AdminDuty[playerid] = 0;
				}
			}

                 // Rest of your command
Reply
#4

Hvala ti FTLOG imas rep ++
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)