Need Help In This Command
#6

This is the correct way

PHP код:
#define FILE_ADMINSS "adminss"
CMDetacolor(playeridparams[])
{
new 
name[64], color[64], levelstring[200], giveplayerss[256], giveplayersss[256], string2[128];
if(
adlvl[playerid] < 5) return 0;
if(
sscanf(params"ds[64]s[64]"levelcolorname)) return SendClientMessage2(playeridCOLOR_WHITE"Usage: /setacolor [level] [color] [name]");
if(
level || level 1) return SendClientMessage(playeridCOLOR_RED"Error: The level must be above 1 and below 6.");
format(string,sizeof(string), "You've changed Admin level: %d's color to {%s}%s {FFFFFF}and name to {%s}%s."levelcolorcolorcolor,name);
SendClientMessage(playeridCOLOR_WHITEstring);
format(giveplayerss50"ADLC_%d"level);//ADLC means Admin Level Color
format(giveplayersss50"ADLN_%d"level);//ADLN means Admin Level Name
dini_Set(AddDirFile(dir_datafilesFILE_ADMINSS), giveplayersscolor);
dini_Set(AddDirFile(dir_datafilesFILE_ADMINSS), giveplayersssname);
if(
adminuc[playerid] == 0)
{
format(string2sizeof(string2), "Admin Log: %s has set admin level %d's color to {%s}%s and name to {%s}%s."GetName(playerid), levelcolorcolorcolorname);
SendMessageToAdmins(COLOR_LIGHTBLUE2string2);
}
return 
1;

I hope this will work
Reply


Messages In This Thread
Need Help In This Command - by SilverScripter - 16.07.2017, 18:24
Re: Need Help In This Command - by Daymen - 16.07.2017, 23:16
Re: Need Help In This Command - by Kane - 16.07.2017, 23:20
Re: Need Help In This Command - by SilverScripter - 17.07.2017, 01:12
Re: Need Help In This Command - by Kane - 17.07.2017, 04:07
Re: Need Help In This Command - by IceBilizard - 17.07.2017, 06:50
Re: Need Help In This Command - by RomaNScripteR - 17.07.2017, 07:05
Re: Need Help In This Command - by Tass007 - 17.07.2017, 08:30
Re: Need Help In This Command - by SilverScripter - 17.07.2017, 09:41
Re: Need Help In This Command - by Tass007 - 17.07.2017, 10:36

Forum Jump:


Users browsing this thread: 2 Guest(s)