/asay command [REP+]
#9

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

He want the name of the admin by whom the command is types.

So the correct code according to the OP requested is
pawn Code:
CMD:asay ( playerid , params [] )
{
    if ( !IsPlayerAdmin ( playerid ) ) return SendClientMessage ( playerid , -1 , "Your not admin" ) ;
    new pName [ MAX_PLAYER_NAME ] , Str [ 128 ] ;
    GetPlayerName ( playerid , pName , MAX_PLAYER_NAME ) ;
    format ( Str , 128 , "%s says : %s" , pName , params ) ;
    SendClientMessageToAll ( -1 , Str ) ;
    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: 6 Guest(s)