15.12.2010, 08:46
Quote:
Well, i think you not used 'CreateObject' you need it to AttachObjecToVehicle.
|
enum PoliceEnum
{
bool:Use,
Neon,
};
new PoliceCar[MAX_VEHICLES][PoliceEnum];
if(strcmp(cmd,"/test",true)==0)
{
if(IsACop(playerid))
{
new veh = GetPlayerVehicleID(playerid);
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 470)
{
if(PoliceCar[veh][Use] == false)
{
PoliceCar[veh][Use] = true;
PoliceCar[veh][Neon] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
AttachObjectToVehicle(PoliceCar[veh][Neon],veh,-0.7,0.0,1.1,0.0,0.0,0.0);
}
else if(Police[veh][Use] == true)
{
PoliceCar[veh][Use] = false;
AttachObjectToVehicle(PoliceCar[veh][Neon],0,0.0,0.0,0.0,0.0,0.0,0.0);
DestroyObject(PoliceCar[veh][Neon]);
}
}
}
return 1;
}
Till 50 players works from time to time , lower than 20 work grate. 50+ don't wanna work