04.12.2010, 18:52
I tested it again and again.. DestroyObject won't work. I just tested it with the new SA:MP objects. Here's an example:
The neon light won't be deleted..
pawn Код:
if (strcmp(cmd, "/neontest", true) == 0)
{
new neon1[MAX_PLAYERS], neon2[MAX_PLAYERS];
if(UserStats[playerid][Fraktion] == 1)
{
if(status1 == 0)
{
status1 = 1;
neon1[playerid] = CreateObject(18647,0,0,0,0,0,0);
neon2[playerid] = CreateObject(18647,0,0,0,0,0,0);
AttachObjectToVehicle(neon11[playerid], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(neon1[playerid], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
return 1;
}
else
{
DestroyObject(neon1[playerid]);
DestroyObject(neon2[playerid]);
status1 = 0;
return 1;
}
}