SendAdminText
#1

Hey all.

Ive got in my server

SendAdminText(playerid, "/pm", params);

But i don't want that all admins can see it. Only my admin account(steven). How can i make it that only i can see it. And how can i make it that only admin level 5 can see it?

Greets steven and thx
Reply
#2

Show us your sendadmintext public
Reply
#3

What u mean?
Reply
#4

Can some one help me?
Reply
#5

its the ppc trucking admin stuff.

if you are the only level 5 admin cant u do it like

pawn Код:
if(APlayerData[playerid][PlayerLevel] < 5) return SendClientMessage(playerid, -1, "{ff0000}you are not admin");
then do something with your sendadmintext
Reply
#6

goto PPC_Common.inc
replace
Код:
// This function sends the given text to all admins
SendAdminText(playerid, command[], text[])
{
	// Setup local variables
	new Name[24], Msg[128];

	// Loop through all players
	for (new i; i < MAX_PLAYERS; i++)
	{
		// Check if the player is an admin
		if (APlayerData[i][PlayerLevel] > 0)
		{
			// Get the player's name
			GetPlayerName(playerid, Name, sizeof(Name));
			// Send the given text to the admin
			format(Msg, 128, "{00FFCC}%s used: %s %s", Name, command, text);
			SendClientMessage(i, 0xFFFFFFFF, Msg);
		}
	}

	// Also log all used commands in the server.log file
	format(Msg, 128, "%s used: %s %s", Name, command, text);
	print(Msg);
}
with
Код:
// This function sends the given text to all admins
SendAdminText(playerid, command[], text[])
{
	// Setup local variables
	new Name[24], Msg[128];

	// Loop through all players
	for (new i; i < MAX_PLAYERS; i++)
	{
		// Check if the player is an admin
		if (APlayerData[i][PlayerLevel] > 5)
		{
			// Get the player's name
			GetPlayerName(playerid, Name, sizeof(Name));
			// Send the given text to the admin
			format(Msg, 128, "{00FFCC}%s used: %s %s", Name, command, text);
			SendClientMessage(i, 0xFFFFFFFF, Msg);
		}
	}

	// Also log all used commands in the server.log file
	format(Msg, 128, "%s used: %s %s", Name, command, text);
	print(Msg);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)