Looking for a Script for automatic reply.
#2

PHP код:
#define COLOR_WHITE 0xFFFFFFAA 
PHP код:
public OnPlayerText(playeridtext[])
{
    {
        new 
string[400], playername[MAX_PLAYER_NAME];
        
GetPlayerName(playeridplayernamesizeof(playername));
        
format(stringsizeof(string), "%s: %s"playernametext);
        
SendClientMessageToAll(-1string);
    }
    if(
strfind(text"How to be a police"true) != -1)
    {
        new 
string[400];
        new 
playername[MAX_PLAYER_NAME];
        
GetPlayerName(playeridplayernamesizeof(playername));
        
format(stringsizeof(string), "Hey, %s you can be a police by entering in a police vehicle and type /job. "GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_WHITEstring);
    }
    return 
0;
}

PHP код:
stock GetPlayerNameEx(playerid)
{
    new
        
sz_playerName[MAX_PLAYER_NAME],
        
i_pos;
    
GetPlayerName(playeridsz_playerNameMAX_PLAYER_NAME);
    while ((
i_pos strfind(sz_playerName"_"falsei_pos)) != -1sz_playerName[i_pos] = ' ';
    return 
sz_playerName;

Not sure if it will work it's not tested as i can't compile it right now, tell me if it works or not.
Reply


Messages In This Thread
Looking for a Script for automatic reply. - by alvin6 - 12.12.2017, 13:24
Re: Looking for a Script for automatic reply. - by solstice_ - 12.12.2017, 13:32
Re: Looking for a Script for automatic reply. - by Sithis - 12.12.2017, 13:34
Re: Looking for a Script for automatic reply. - by jasperschellekens - 12.12.2017, 14:00

Forum Jump:


Users browsing this thread: 1 Guest(s)