03.04.2011, 14:11
(
Последний раз редактировалось eDz0r; 06.04.2011 в 10:48.
)
So... From This Tutorial I Write This. So How I Make Load And Save CallBacks Because I Don't Get It .
With Dini Of Course
With Dini Of Course
pawn Код:
#include <a_samp>
#include <dini>
enum vInfo
{
vModelID,
vX,
vY,
vZ,
vA,
vC1,
vC2,
vOwned,
vOwner[MAX_PLAYER_NAME],
vPrice,
};
new VehicleShopInfo[MAX_VEHICLES][vInfo];
new bool:IsValidVehicle[MAX_VEHICLES];
stock GetFreeVehicleSlot()
{
for(new vID = 0; vID < sizeof(VehicleShopInfo); vID ++)
{
if(!VehicleShopInfo[i]) return i;
}
return -1;
}
stock CreateShopVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, owned, owner, price)
{
new vID = GetFreeVehicleSlot();
VehicleShopInfo[vID][vModelID] = modelid
VehicleShopInfo[vID][vX] = x
VehicleShopInfo[vID][vY] = y
VehicleShopInfo[vID][vZ] = z
VehicleShopInfo[vID][vA] = angle
VehicleShopInfo[vID][vC1] = color1
VehicleShopInfo[vID][vC2] = color2
VehicleShopInfo[vID][vOwned] = owned
VehicleShopInfo[vID][vOwner] = owner
VehicleShopInfo[vID][vPrice] = price
IsValidVehicle[vID] = true;
CreateVehicle(modelid, x, y, z, angle, color1, color2, 0);
return vID;
}