stock CreateVehicle2(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay){new Vehicle = CreateVehicle(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay);SetGVarInt(\"VehicleColor1\", color1, modelid);SetGVarInt(\"VehicleColor2\", color2, modelid);return Vehicle;}#define CreateVehicle CreateVehicle2stock DestroyVehicle2(vehicleid){DeleteGVar(\"VehicleColor1\", vehicleid);DeleteGVar(\"VehicleColor2\", vehicleid);return DestroyVehicle(vehicleid);}#define DestroyVehicle DestroyVehicle2stock GetVehicleColor(vehicleid,&color1,&color2){color1 = GetGVarInt(\"VehicleColor1\", vehicleid); color2 = GetGVarInt(\"VehicleColor2\", vehicleid);return 1;}
stock CreateVehicle2(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay){new Vehicle = CreateVehicle(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay);SetGVarInt(\"VehicleColor1\", color1, Vehicle);SetGVarInt(\"VehicleColor2\", color2, Vehicle);return Vehicle;}#define CreateVehicle CreateVehicle2
SZerintem az úgy nem jó Pls valami más megoldást Thx
stock CreateVehicle2(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay){new Vehicle = CreateVehicle(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay);SetGVarInt(\"VehicleColor1\", color1, Vehicle);SetGVarInt(\"VehicleColor2\", color2, Vehicle);return Vehicle;}#undef CreateVehicle#define CreateVehicle CreateVehicle2
stock CreateVehicle2(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay) { new formazas[50 + 1]; new Vehicle = CreateVehicle(modelid, x, y, z, angle, color1, color2, respawn_delay); format(formazas, sizeof(formazas), \"Vehicle%dColor1\", Vehicle); SetGVarInt(formazas, color1, Vehicle); format(formazas, sizeof(formazas), \"Vehicle%dColor2\", Vehicle); SetGVarInt(formazas, color2, Vehicle); return Vehicle; } #undef CreateVehicle #define CreateVehicle CreateVehicle2
new VehicleColors[MAX_VEHICLES][2];stock ex_CreateVehicle(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay){new VehicleID = CreateVehicle(modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,respawn_delay);VehicleColors[VehicleID][0] = color1;VehicleColors[VehicleID][1] = color2;return VehicleID;}#define CreateVehicle ex_CreateVehiclestock GetVehicleColor(vehicleid,&color1,&color2){color1 = VehicleColors[vehicleid][0];color2 = VehicleColors[vehicleid][1];return 1;}