SA-MP Forums Archive
Help with Duty [REP ++] - 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: Help with Duty [REP ++] (/showthread.php?tid=398705)



Help with Duty [REP ++] - teomakedonija - 10.12.2012

Код:
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 ++]


Re: Help with Duty [REP ++] - Mr.Anonymous - 10.12.2012

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

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


Re: Help with Duty [REP ++] - FTLOG - 10.12.2012

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



Re: Help with Duty [REP ++] - teomakedonija - 12.12.2012

Hvala ti FTLOG imas rep ++