Here
[pawn] else if ( strcmp( cmd, "news", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else if ( !strlen( tmp ) ) { SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c news [Message]" ); }
else
{
new szMsg[ 128 ];
format( szMsg, 128, "News By %s : %s", gPlayers[ playerid ], cmdtext[ 3 ] );
SendClientMessageToAll( RED, szMsg );
}
return 1;
} [/pawn]
you just have to write /c news like news by spider join the server visit our forum etc
i have one more which can save your news
[pawn] else if (strcmp(cmd, "setnews", true) == 0) {
new setnews[256];
tmp = strtok(cmdtext, idx);
if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setnews text");
else {
format(file, sizeof(file), "/News/News.ini", "News");
format(setnews,sizeof(setnews),"By [%s]> %s ",gPlayers[playerid],cmdtext[7]);
dini_Set(file, "News", setnews);
}
return 1;
}[/pawn]
timer
[pawn]SetTimer("DisplayNews",1000*60*1,1);[/pawn]
public
[pawn]public DisplayNews()
{
new Msg[256];
new xgv[256];
format(file, sizeof(file), "/News/News.ini");
xgv = dini_Get(file, "News");
format(Msg,sizeof(Msg),"News>:%s",xgv);
SendClientMessageToAll(COLOR_YELLOW, Msg);
}[/pawn]
you have to make a folder
News and in folder News.ini
good luck