SA-MP Forums Archive
DestroyVehilcle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DestroyVehilcle (/showthread.php?tid=468647)



DestroyVehilcle - AnonScripter - 09.10.2013

why this doesn't destroy the vehicle ?

pawn Код:
CMD:des(playerid, params[])
{
    new currentveh = GetPlayerVehicleID(playerid);
    if(currentveh == 402) //bufallo
    {
        DestroyVehicle(currentveh);
        GivePlayerMoney(playerid,30000);
    }
    return 1;
}



Re: DestroyVehilcle - DanishHaq - 09.10.2013

That's destroying the car ID of 402, not the car model ID of 402.

pawn Код:
CMD:des(playerid, params[])
{
    new currentveh = GetPlayerVehicleID(playerid);
    new vehicle = GetVehicleModel(currentveh);
    if(vehicle == 402) //bufallo
    {
        DestroyVehicle(currentveh);
        GivePlayerMoney(playerid,30000);
    }
    return 1;
}



Re: DestroyVehilcle - AnonScripter - 09.10.2013

thankyou