/a Command - 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: /a Command (
/showthread.php?tid=285841)
/a Command -
SAMPTUTORIALS - 25.09.2011
For my Roleplay Server, When I type /a (Type in watever you want to say) I want it display a color Like this. /a (Name of the person) [
Senior Admin] (Chat)..... I also want it to recognize what admin Rank you are so when you type in /a It doesn't show you As Senior admin when your actually Head or something like that.
Please help
Re: /a Command -
[MWR]Blood - 25.09.2011
This thread has been created for a reason!
https://sampforum.blast.hk/showthread.php?tid=187229
Re: /a Command -
SAMPTUTORIALS - 25.09.2011
Can't find it.... Anyone else?
Re: /a Command -
[MWR]Blood - 25.09.2011
You haven't to find anything.
The thread is called Script Request...
Re: /a Command -
SAMPTUTORIALS - 25.09.2011
Do I need to request it? Can't you post it here? I mean, I already made the thread
Re: /a Command -
Jafet_Macario - 25.09.2011
pawn Код:
enum AdminData
{
pAdmin,
}
new pData[ MAX_PLAYERS ][ AdminData ];
YCMD:a(playerid, o[], help)
{
if(help) return SendClientMessage(playerid, -1,"With this command you can speak in admin chat");
else
{
new name[MAX_PLAYER_NAME], string[128], arank[20];
if(isnull(o)) return SendClientMessage(playerid, -1,"Syntax error: /a [text]");
GetPlayerName(playerid, name, sizeof(name));
if(pData[ playerid ][ pAdmin ] == 1)
{ arank = "Head Admin"; }
else if(pData[ playerid ][ pAdmin ] == 2)
{ arank = "Senior Admin"; }
else if(pData[ playerid ][ pAdmin ] == 3)
{ arank = "Admin"; }
else { arank = "None"; }
format(str,sizeof(str),"%s [{00FF22}%s{FFFFFF}]: %s", name, arank, o);
SendAdminMessage(-1, string);
}
return 1;
}
stock SendAdminMessage(color, string[])
{
foreach(Player, i)
{
if(pData[ i ][ pAdmin ] > 0)
{
SendClientMessage(i, color, string);
}
}
}
Re: /a Command -
SAMPTUTORIALS - 25.09.2011
You sure? It just comes up with UNKNOWN command D;
Re: /a Command -
Jafet_Macario - 25.09.2011
Are you using another command processors besides y_commands?
Re: /a Command -
[MWR]Blood - 25.09.2011
Quote:
Originally Posted by SAMPTUTORIALS
You sure? It just comes up with UNKNOWN command D;
|
It uses Y_INI; assure that you have the include and that you put the command outside of OnPlayerCommandText callback.
Re: /a Command -
iPLEOMAX - 25.09.2011
I suggest you look up some basic scripting tutorials from
http://wiki.sa-mp.com
It's not an Easy thing for beginners to start with Admin Levels and all..