Quote:
Originally Posted by antonio112
I`ll help you with the second problem. Here`s a /announce command, in ZCMD:
pawn Код:
CMD:announce( playerid, params[ ] ) { if ( GetAdminLevel( playerid ) < 3 ) // Here you put your admin levels defined. return 1;
new temptext[ 128 ]; // Here we define the first parameter in the command, for like /announce "TEXT" - text is the parameter if ( sscanf( params, "s[128]", temptext ) ) // Here we check if there`s any parameter ... if not, it`ll SendClientMessage to admin that uses /announce return SendClientMessage( playerid, -1, "Usage: /(ann)ounce <Text>");
new String[ 128 ];
format( String, sizeof String, "Admin announce: %s", temptext ); // Here`s the output of the command. This message we`ll be send to all players SendClientMessageToAll( -1, String ); return 1; } CMD:ann( playerid, params[] ) return cmd_announce( playerid,params ); // With this, you can use /ann instead of /announce
About your first problem ... I can`t really help you.
|
Just a question: Why "temptext" (or it could be any other names?) and why "128" in String[ 128 ]; ?
But thanks to you both, I'll test that asap.