SA-MP Forums Archive
1 request + 2 questions - 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: 1 request + 2 questions (/showthread.php?tid=355447)



1 request + 2 questions - Opah - 30.06.2012

1.i need a working OnPlayerDestroy callback coz OnVehicleDeath doesn't work when DestroyVehicle function is done


2.i have bomber [fs] by Mauzen there is a little problem when the player was put in a vehicle not entered normally the textdraw of the types of bombs doesn't appear


3.i made a remote missile system but i don't know how to make OnPlayerDeath work properly with that the PVar is "inphenix"

thanx for reading
opah


Re: 1 request + 2 questions - CoaPsyFactor - 30.06.2012

pawn Код:
forward OnPlayerDestroy(playerid, vehicleid);
forward DestroyVehicleEx(playerid, vehicleid);

public DestroyVehicleEx(playerid, vehicleid){
 DestroyVehicle(vehicleid);
 CallLocalFunction("OnPlayerDestroy", "dd", playerid, vehicleid);
}

public OnPlayerDestroy(playerid, vehicleid){
    printf("Player %d destroyed vehicle %d", playerid, vehicleid);
    return true;
}



Re: 1 request + 2 questions - MP2 - 30.06.2012

If you want DestroyVehicle to call OnVehicleDeath hook it.


Re: 1 request + 2 questions - Opah - 30.06.2012

the problem is that i have mini-guns attached to some vehicles (mini-gun on tanks by mean but i modified it) and my vehicle spawner destroy the previous vehicle and spawn a new one the big problem is that the mini-guns are attached to the new vehicle


Re: 1 request + 2 questions - milanosie - 30.06.2012

Quote:
Originally Posted by Opah
Посмотреть сообщение
the problem is that i have mini-guns attached to some vehicles (mini-gun on tanks by mean but i modified it) and my vehicle spawner destroy the previous vehicle and spawn a new one the big problem is that the mini-guns are attached to the new vehicle
Just destroy the minigun with DestroyObject, easy


Re: 1 request + 2 questions - Opah - 30.06.2012

i did but the problem is the [fs] uses timers to check if the object is there or not


Re: 1 request + 2 questions - milanosie - 30.06.2012

Quote:
Originally Posted by Opah
Посмотреть сообщение
i did but the problem is the [fs] uses timers to check if the object is there or not
Thats not a problem?
How is that a problem?


Re: 1 request + 2 questions - MadeMan - 30.06.2012

Remove the timer then and attach the objects only when needed.


Re: 1 request + 2 questions - Opah - 30.06.2012

i need it all the time
so the players see the miniguns before entering