1 error
#8

Quote:
Originally Posted by silenthill
Посмотреть сообщение
Try
pawn Код:
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),"[RCON ADMIN] %s: %d", name,playerid, 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
}
https://sampforum.blast.hk/showthread.php?tid=403293
sorry for the late reply i've been busy, this code makes my server crash! :/ everytime i open samp_server.exe it open but it close 1 second later.
Reply


Messages In This Thread
1 error - by Andre02 - 21.08.2014, 14:46
Re: 1 error - by MicroD - 21.08.2014, 14:49
Re: 1 error - by Kyance - 21.08.2014, 14:50
Re : 1 error - by Andre02 - 21.08.2014, 14:56
Re : 1 error - by Andre02 - 21.08.2014, 15:11
Re : 1 error - by Andre02 - 21.08.2014, 17:56
Re: 1 error - by silenthill - 21.08.2014, 18:26
Re : Re: 1 error - by Andre02 - 25.08.2014, 03:45

Forum Jump:


Users browsing this thread: 2 Guest(s)