SendAdminText - 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: SendAdminText (
/showthread.php?tid=327219)
SendAdminText -
steven - 20.03.2012
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
Re: SendAdminText -
Roel - 20.03.2012
Show us your sendadmintext public
Re: SendAdminText -
steven - 20.03.2012
What u mean?
Re: SendAdminText -
steven - 20.03.2012
Can some one help me?
Re: SendAdminText -
[LHT]Bally - 20.03.2012
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
Re: SendAdminText -
tyler12 - 20.03.2012
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);
}