29.12.2012, 20:00
hello guys my question is that how could i make a script wich puts (Admin) at admins name... im yousing LuxAdmin system pls help
In chat of course
![Confused](images/smilies/confused.png)
public OnPlayerText(playerid, text[]) //This is called every time a player tries to type something, other than a command, such as when talking to other players
{
if(IsPlayerAdmin(playerid)) //If they are an admin, you can replace this with your own admin variable
{
new string[150], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string,sizeof(string),"[ADMIN] %s: %s", name, text); //Editing the format and adding admin tag in front of name
SendClientMessageToAll(0xFFFF00FF, string); //Sends message to all
return 0; //Return false for sending custom chat, so it doesn't send your message twice
}
return 1; //Otherwise return 1 and send the message as normal
}
C:\Users\Hunor\Desktop\tag.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerText") C:\Users\Hunor\Desktop\tag.pwn(3) : error 017: undefined symbol "IsPlayerAdmin" C:\Users\Hunor\Desktop\tag.pwn(5) : error 017: undefined symbol "MAX_PLAYER_NAME" C:\Users\Hunor\Desktop\tag.pwn(5) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\Hunor\Desktop\tag.pwn(5) : error 036: empty statement C:\Users\Hunor\Desktop\tag.pwn(5) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
#include <a_samp>