/asay command [REP+]
#8

Quote:
Originally Posted by Bogdan1992
View Post
PHP Code:
CMD:a(playeridparams[]){
     new 
pname[MAX_PLAYER_NAME];
    if(
PlayerInfo[playerid][pAdmin] < 1) return 0;
    if(
sscanf(params,"u"strings)) return SendClientMessage(playerid,COLOR_LIGHTBLUE"USAGE: {FFFFFF}/a [text]");
GetPlayerName(playeridpnamesizeof(pname));
    
format(stringssizeof(strings), "Admin %s: %s"pname,params);
    
SendClientMessageToAll(0x1874CDAAstrings);
    return 
1;

LOL, man, param "u" is for user/bot, "s" is for string in sscanf.

Code:
CMD:a( playerid, params[ ] )
{
    if ( PlayerInfo[ playerid ][ Level ] < 1 ) return SendClientMessage( playerid, 0xFF0000FF, "ERROR: You need to be admin level 1, to use this command!" );
    new lsAnn[ 128 ];
    if ( sscanf( params, "s[128]", lsAnn ) ) return SendClientMessage( playerid, 0xFF0000FF, "USAGE: /a [Text]" );

    new string[ 129 ];
    format( string, sizeof( string ), "Admin %s: %s", PlayerName( playerid ), lsAnn );
    SendClientMessageToAll( COLOR, string );
    return 1;
}
Reply


Messages In This Thread
/asay command [REP+] - by [FoR]EveR - 22.03.2012, 15:29
Re: /asay command [REP+] - by Bogdan1992 - 22.03.2012, 15:31
Re: /asay command [REP+] - by Twisted_Insane - 22.03.2012, 15:32
Re: /asay command [REP+] - by [FoR]EveR - 22.03.2012, 15:34
Re: /asay command [REP+] - by AlTy - 22.03.2012, 15:35
Re: /asay command [REP+] - by Bogdan1992 - 22.03.2012, 15:37
Re: /asay command [REP+] - by [FoR]EveR - 22.03.2012, 15:37
Re: /asay command [REP+] - by Edvin - 22.03.2012, 15:38
Re: /asay command [REP+] - by Ronaldo_raul™ - 22.03.2012, 15:43
Re: /asay command [REP+] - by XinGeR - 31.12.2014, 13:00

Forum Jump:


Users browsing this thread: 5 Guest(s)