27.05.2012, 05:34
If i buy a DFT-30,it have some object attached:
But,if i restart the server,they are gone,i've tried:
And it's not working,help me!
pawn Код:
else if(strcmp(x_nr,"DFT-30",true) == 0)
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_DBLUE, "Ai nevoie de nivel 3 !");
return 1;
}
if(GetPlayerMoney(playerid) < 50000)
{
SendClientMessage(playerid, COLOR_WHITE, "Nu ai destui bani");
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);
carid = CreateVehicle(578, 644.2462, -503.4926, 16.4790+0.2,359.1141,1,1,-1);
side1[vehicleid] = CreateObject(983,0,0,-1000,0,0,0,100);
side2[vehicleid] = CreateObject(983,0,0,-1000,0,0,0,100);
CarInfo[carid][cModel] = 578;
CarInfo[carid][cValue] = 50000;
ModelMasina = "DFT-30";
AttachObjectToVehicle(side1[vehicleid], carid, 1.275000,-1.500000,0.449999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(side2[vehicleid], carid, -1.350000,-1.500000,0.449999,0.000000,0.000000,0.000000);
TotalMasini++
}
pawn Код:
new side1[MAX_VEHICLES];
new side2[MAX_VEHICLES];
pawn Код:
public OnVehicleSpawn(vehicleid)
{
if(IsADFT(vehicleid))
{
side1[vehicleid] = CreateObject(983,0,0,-1000,0,0,0,100);
side2[vehicleid] = CreateObject(983,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(side1[vehicleid], vehicleid, 1.275000,-1.500000,0.449999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(side2[vehicleid], vehicleid, -1.350000,-1.500000,0.449999,0.000000,0.000000,0.000000);
}