14.11.2018, 00:46
I try to make gang color without dialog,and don't work so good.
When I write the command,the color of the name change..
And the color of the territory don't change with the color I write.
When I write the command,the color of the name change..
And the color of the territory don't change with the color I write.
Код HTML:
CMD:gcolor(playerid, params[]) { if(CosminInfo[playerid][g_Rank] < 9) return SendError2(playerid, "{FFFFFF}You need to be Gang Rank 9 to use this command", "{FFFFFF}Trebuie sa ai Rank 9 in Gang pentru a folosi aceasta comanda"); //-------------------------------------------------------------------------- if(sscanf(params, "x", params[0])) return SendUsage(playerid, "/gcolor [Color Code]"); //-------------------------------------------------------------------------- //for(new i = 0; i < MAX_GANGS; i++) if(GangInfo[i][GangColor] == SetPlayerColor(i, params[0])) return SendError2(playerid, "{FFFFFF}Sorry,but the selected color are using some gang. Please select another", "{FFFFFF}Scuze,dar aceasta culoare este folosita de alt gang,te rog sa incerci alta"); //-------------------------------------------------------------------------- { params[0] = (params[0] * 256) + 0xAA; //------------------------------------------------------------------- foreach(new i : Player) if(CosminInfo[playerid][GangID] == CosminInfo[i][GangID]) SetPlayerColor(i, params[0]), GameTextForPlayer(playerid, "~w~~h~Gang color ~n~~g~~h~~h~updated!", 4000, 4); //------------------------------------------------------------------- format(eString, sizeof eString, "GANG: {FFFFFF}Founder '{FFFF00}%s{FFFFFF}' has set a new color to your gang.", PlayerName(playerid)); SendGangMessage(CosminInfo[playerid][GangID], eString); //------------------------------------------------------------------- foreach(new i : Player) //------------------------------------------------------------------- if(CosminInfo[playerid][GangID] == CosminInfo[i][GangID]) SetPlayerColor(i, params[0]); //------------------------------------------------------------------- } return 1; }