17.01.2016, 18:42
When i buy the neon i cant put it on its tells me this, hope someone can help me out thanks in advance!
Код:
if(GetPVarInt(playerid, "Neon") == 0) return SendClientMessage(playerid,COLOR_GREY,"You need neon to use this.");
PHP код:
}
else if(strcmp(type, "getneon", true) == 0)
{
new carid = PlayerToCar(playerid,2,4.0);
if(VehicleInfo[carid][vOwned] == SCRIPT_CARS) return SendClientMessage(playerid,COLOR_GREY,"This is not an ownable vehicle.");
if(IsNotAEngineCar(carid)) return SendClientMessage(playerid, COLOR_GREY, "This vehicle dosent have an engine.");
if(IsHelmetCar(carid)) return SendClientMessage(playerid, COLOR_GREY, "This vehicle dosent have a door.");
new key = VehicleInfo[carid][vOwned];
CarInfo[key][cNeon]=1;
SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon installed");
SaveCars();
SaveCars2();
}
else if(strcmp(type, "takeonneon", true) == 0)
{
new carid = PlayerToCar(playerid,2,4.0);
new key = VehicleInfo[carid][vOwned];
if(GetPVarInt(playerid, "Neon") == 0) return SendClientMessage(playerid,COLOR_GREY,"You need neon to use this.");
if(CarInfo[key][cNeon] != 0) return SendClientMessage(playerid,COLOR_GREY,"This vehicle already contains neon.");
if(VehicleInfo[carid][vOwned] == SCRIPT_CARS) return SendClientMessage(playerid,COLOR_GREY,"This is not an ownable vehicle.");
if(IsNotAEngineCar(carid)) return SendClientMessage(playerid, COLOR_GREY, "This vehicle dosent have an engine.");
if(IsHelmetCar(carid)) return SendClientMessage(playerid, COLOR_GREY, "This vehicle dosent have a door.");
SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon attached to the vehicle");
}
else if(strcmp(type, "takeoffneon", true) == 0)
{
new carid = PlayerToCar(playerid,2,4.0);
new key = VehicleInfo[carid][vOwned];
if(CarInfo[key][cNeon] > 1) return SendClientMessage(playerid, COLOR_GREY, "You don't have installed neon on you'r vehicle!");
if(VehicleInfo[carid][vOwned] == SCRIPT_CARS) return SendClientMessage(playerid,COLOR_GREY,"This is not an ownable vehicle.");
if(IsNotAEngineCar(carid)) return SendClientMessage(playerid, COLOR_GREY, "This vehicle dosent have an engine.");
if(IsHelmetCar(carid)) return SendClientMessage(playerid, COLOR_GREY, "This vehicle dosent have a door.");
DeletePVar(playerid, "neon", DestroyObject(18647));
DeletePVar(playerid, "neon", DestroyObject(18647));
SendClientMessage(playerid, 0xFFFFFFAA, "Neon deattached to the vehicle");