[Duda]Comando crear vehiculos en familia [RP]
#1

Buenas. Tengo este codigo, y lo que quiero saber es que tengo que hacer para aumentar el numero de autos en las fam (actualmente 4)
Код:
CMD:creategvehicle(playerid, params[])
{
	new string[128], family, modelid, color1, color2;
	if(sscanf(params, "dddd", family, modelid, color1, color2)) return SendClientMessageEx(playerid, COLOR_WHITE, "USA: /creategvehicle [ID FAM] [Modelo] [color 1] [color 2]");
    if (Info[playerid][pAdminRP] < 4 && Info[playerid][pGangModerator] != 1)
    {
    	SendClientMessageEx(playerid, COLOR_GREY, " No puedes usar este comando");
     	return 1;
    }
   	if(family < 1 || family > MAX_FAMILY) { SendClientMessageEx(playerid, COLOR_GREY, "   Familias: 1 - 14!"); return 1; }
	family -= 1;
	if(fINFO[family][FamilyTaken] != 1)
	{
		SendClientMessageEx(playerid, COLOR_GREY, "   Esa familia no estб ocupada!");
		return 1;
	}
	if(color1 < 0 || color1 > 126) { SendClientMessageEx(playerid, COLOR_GREY, "   COLOR: 0 a 126!"); return 1; }
	if(color2 < 0 || color2 > 126) { SendClientMessageEx(playerid, COLOR_GREY, "   COLOR: 0 a 126!"); return 1; }
	if(modelid < 400 || modelid > 611) { SendClientMessageEx(playerid, COLOR_GREY, "   Vehiculos: 400 al 611 !"); return 1; }
	new gangvehicleid = GetGangFreeVehicleId(family);
	if(gangvehicleid == -1) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: Esa familia no puede tener mбs coches.");
	new Float:X,Float:Y,Float:Z;
 	GetPlayerPos(playerid,X,Y,Z);
  	new Float:Angle;
   	GetPlayerFacingAngle(playerid,Angle);
   	new car = CreateGangVehicle(family, gangvehicleid, modelid, X, Y, Z, Angle, color1, color2, 0);
   	if(car == INVALID_VEHICLE_ID)
	{
 		SendClientMessageEx(playerid, COLOR_GREY, "ERROR: Algo saliу mal y el coche no se creу.");
	}
 	else
  	{
   		format(string, sizeof(string), " Coche creado. ID: %d.", car);
    	SendClientMessageEx(playerid, COLOR_GRAD1, string);
	    saveFamiliesHQ();
	}
	return 1;
}
Tengo que editar algo en lo que estб azul? si me ayudan gracias!
Reply
#2

Busca йsta lнnea. Y cambia el "8" por el nъmero mбximo que quieras poner de vehнculos .

Код:
#define 			MAX_GANG_VEHICLES 			(8)
Reply
#3

Quote:
Originally Posted by Leososa
Посмотреть сообщение
Busca йsta lнnea. Y cambia el "8" por el nъmero mбximo que quieras poner de vehнculos .

Код:
#define 			MAX_GANG_VEHICLES 			(8)

Ahн lo editй (estaba en 8 y podia poner 4 autos) lo cambiй y ahora esperare a que termine de scriptear.. Gracias!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)