Can't get object to destroy
#1

Title says it all. Here's the code:

pawn Код:
NeonStatus[MAX_VEHICLES];
pawn Код:
carneon[vid] = CreateObject(18648,0,0,0,0,0,0);
carneon2[vid] = CreateObject(18648,0,0,0,0,0,0);
AttachObjectToVehicle(carneon[vid], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(carneon2[vid], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
NeonStatus[vid] = 1;
// Creates & attaches neon
pawn Код:
CMD:neon(playerid, params[])
{
    if(NeonStatus[GetPlayerVehicleID(playerid)] == 1)
    {
        NeonStatus[GetPlayerVehicleID(playerid)] = 0;
        DestroyObject(carneon[GetPlayerVehicleID(playerid)]);
        DestroyObject(carneon2[GetPlayerVehicleID(playerid)]);
                // should destroy the object but doesn't.
    }else
    {
        ShowPlayerDialog(playerid, NeonDialog, DIALOG_STYLE_LIST, "Select a color:", "Blue\r\nRed\r\nYellow\r\nGreen\r\nPink", "Select", "Cancel");
    }
    return 1;
}
Reply


Messages In This Thread
Can't get object to destroy - by austin070 - 18.10.2011, 21:38
Re: Can't get object to destroy - by Tom1412 - 18.10.2011, 22:36
Re: Can't get object to destroy - by WackoX - 18.10.2011, 22:40
Re: Can't get object to destroy - by austin070 - 18.10.2011, 22:44
Re: Can't get object to destroy - by WackoX - 18.10.2011, 22:45
Re: Can't get object to destroy - by austin070 - 18.10.2011, 22:56
Re: Can't get object to destroy - by Tom1412 - 19.10.2011, 00:36

Forum Jump:


Users browsing this thread: 1 Guest(s)