All pastes #623770 Raw Edit

Zeug

public text v1 · immutable
·published 2007-07-17 20:41 UTC
rendered paste body
//The /ann command(Gametext)
dcmd_ann(playerid,params[]){
	new pname[MAX_PLAYER_NAME], str[256];
	GetPlayerName(playerid, pname, 24);
	format(str, 256, "~l~]~w~%s: %s ~l~]",pname,params);
	GameTextForAll(str,5000,4);
    return true;
}

// The /ad command:(Admin Chat)
dcmd_ad(playerid,params[]){
	new pname[MAX_PLAYER_NAME], str[256];
	GetPlayerName(playerid, pname, 24);
	format(str, 256, "%s: %s",pname,params);
	SendClientMessageToAdmins(0x0000FF, str);
    return true;
}
//SendClientMessageToAdmins
SendClientMessageToAdmins(colour, const message[]) {
    for(new a=0; a<MAX_PLAYERS; a++) {
        if(IsPlayerConnected(a)) {
            if(IsPlayerAdmin(a)) {
                SendClientMessage(a, colour, message);
            }
        }
    }
}