Little question.
#1

I want a command like.
If the admin types /adminod a message will be sent to all players that are currently online in the server with
X is now on duty as an admin.
X will be the name of the admin that typed /adminod
The player's team color will be set to a specific color.

Then if the types /adminof a message will be sent to all players with X is no longer on duty as an admin.
X will be the name of the admin that types /adminof.
The player's team color will be set back to the color he had before he typed /adminod.

Well,I managed to do something but it didn't worked.The thing with the color I managed to do,but IDK how to make the message.I tried many different ways it just won't work and IDK why.

Thanks in advance.
Regards ~ FreeSoul
Reply
#2

thats why we got a script request topic.
Reply
#3

Sorry I will try there,but usualy nobody answers me.That's why I posted here.
Reply
#4

Bump,sorry,can somebody help me? nobody answers the script req thread for me.

Have a nice day/night
Reply
#5

Код:
	if(!strcmp(cmdtext, "/adminduty", true)) // By Ellis
	{
		if(IsPlayerConnected(playerid))
		{
		  if(gPlayerLogged[playerid] == 0)
		  {
		    SendClientMessage(playerid, COLOR_GREY, "  You need to login first !");
				return 1;
		  }
		  if(PlayerInfo[playerid][pAdmin] > 0)
		  {
		    if(AdminDuty[playerid] == 0)
		    {
		      AdminDuty[playerid] = 1;
		      SetPlayerArmour(playerid, 999);
					SetPlayerHealth(playerid, 999);
					SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "AdmWarning: [ID:%d]%s goes on duty as admin", playerid, sendername);
					ABroadCast(COLOR_YELLOW,string,1);
					if(PlayerInfo[playerid][pAdmin] >= 1337)
					{
					  for(new i = 0; i < sizeof(CarInfo); i++)
						{
							SetVehicleParamsForPlayer(i,playerid,0,0);
						}
					}
					return 1;
		    }
		    else if(AdminDuty[playerid] == 1)
		    {
		      AdminDuty[playerid] = 0;
		      SetPlayerArmour(playerid, 0);
					SetPlayerHealth(playerid, 100);
					SetPlayerColor(playerid,TEAM_HIT_COLOR);
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "AdmWarning: [ID:%d]%s goes off duty as admin", playerid, sendername);
					ABroadCast(COLOR_YELLOW,string,1);
					SetPlayerToTeamColor(playerid);
					return 1;
		    }
		  }
		  else
		  {
		    SendClientMessage(playerid, COLOR_GREY, "  You're not the admin !");
		    return 1;
		  }
		}
	  return 1;
	}
Uses [pAdmin], although you can change..

enjoy
Reply
#6

Done.
But if I do /aod and then /aod again it doesn't send the message with Is now off duty.
Why?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)