01.03.2014, 13:43
Hi,
I'm making an admin chat command but I'd like some minor help with the command. I'd highly appriciate it if you guys or gals could help me out by showing me how I can change the following script into such: I'd like players with a level above 1 to be able to speak in /ac, although when they use the command I want it to say "(( Admin %s: %s ))", but when level 1 players use the command I want it to say "(( Moderator %s: %s )). Oh, and obviously level 0 players shouldn't be able to use the command, as demonstrated in the script. I doubt it's too hard for you guys, and I'll appriciate it a lot if you help out!
I'm making an admin chat command but I'd like some minor help with the command. I'd highly appriciate it if you guys or gals could help me out by showing me how I can change the following script into such: I'd like players with a level above 1 to be able to speak in /ac, although when they use the command I want it to say "(( Admin %s: %s ))", but when level 1 players use the command I want it to say "(( Moderator %s: %s )). Oh, and obviously level 0 players shouldn't be able to use the command, as demonstrated in the script. I doubt it's too hard for you guys, and I'll appriciate it a lot if you help out!
pawn Code:
CMD:ac(playerid,params[])
{
if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xF69521AA, "You can't use this command!");
if(isnull(params)) return SendClientMessage(playerid, 0xF69521AA, "USAGE: /ac [message]");
new string[128];
format(string, sizeof(string), "Admin %s: %s", GetPName(playerid), params);
foreach(Player, i){
if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xc3f8fd, string);
}
return 1;
}