SA-MP Forums Archive
Help command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help command (/showthread.php?tid=661321)



Help command - PaulCrouseVS - 30.11.2018

Good evening, I would like your help, the fact is that this command is to change the color of the zones for Illegal factions, but it does not work for Legal, I would like it if:

Код:
COMMAND:zonacolor(playerid, params[])
{
	new facc, icolor;
	if(cuenta[playerid][cAdministrador] < 2013)return Mensaje(playerid, COLOR_GRIS2, "No autorizado!");
	if(sscanf(params, "dd", facc, icolor))return Mensaje(playerid, COLOR_GRIS2, "Utiliza /zonacolor [ID Faccion] [Color ID]");
	if(icolor < 0 || icolor > 136)return Mensaje(playerid, COLOR_GRIS2, "Error ID del color no valida.");
	if(facc < 16 || facc > 45)return Mensaje(playerid, COLOR_GRIS2, "Error ID de faccion no valida.");

	IFacciones[facc - 16][If@color] = icolor;
	GangZoneShowForAll(IFacciones[facc - 16][If@gang], ColorAlpha[IFacciones[facc - 16][If@color]]);
	Mensaje(playerid, ColorAlpha[icolor], "Color de la zona, fue cambiado exitosamente.");
	ActualizarFaccion(facc - 16);
	return 1;
}