[HELP] Nitro and Repair system - 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: [HELP] Nitro and Repair system (
/showthread.php?tid=312729)
[HELP] Nitro and Repair system -
arjanforgames - 22.01.2012
Hey guys,
I am making kind of Destruction derby server where you have to drive over different obstacles.
Now I have this future:
You start in a Infernus and when you drive thru an icon you get a kart (and infernus is gone)
Most people will know what I mean.
Now I need some help.
If I place a icon (Pickup icon ID 1239, with the text "Repair" or "Nitro" and maybe "Repair and Nitro")
I want to get nitro/repair while driving thru the point.
Any help?
Thanks
Re: [HELP] Nitro and Repair system -
coole210 - 22.01.2012
Use
OnPlayerPickUpPickup
Re: [HELP] Nitro and Repair system -
niels44 - 22.01.2012
just use RepairVehicle and AddVehicleComponent(carid, 1010) 1010 is NOS
Re: [HELP] Nitro and Repair system -
arjanforgames - 22.01.2012
Some more help please? Part of script?
Re: [HELP] Nitro and Repair system -
arjanforgames - 24.01.2012
Bump
Re: [HELP] Nitro and Repair system -
[KHK]Khalid - 24.01.2012
try this
pawn Код:
// on the top of your script
new pu;
Check this page
https://sampwiki.blast.hk/wiki/CreatePickup
pawn Код:
// put this under OnGameModeInit
pu = CreatePickup(pickup id,pick up type ,X coordinate,Y coordinate,Z coordinate,virtual world id);
pawn Код:
// put this under OnPlayerPickUpPickup
if(pickupid == pu)
{
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(playerid); // will repair your vehicle
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); // will add the nos
return 1;
}
return 1;
}
NOTE : the codes are NOT compiled!
Re: [HELP] Nitro and Repair system -
milanosie - 24.01.2012
Quote:
Originally Posted by HellSphinX
try this
pawn Код:
// on the top of your script new pu;
Check this page https://sampwiki.blast.hk/wiki/CreatePickup
pawn Код:
// put this under OnGameModeInit pu = CreatePickup(pickup id,pick up type ,X coordinate,Y coordinate,Z coordinate,virtual world id);
pawn Код:
// put this under OnPlayerPickUpPickup if(pickupid == pu) { if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(playerid); // will repair your vehicle AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); // will add the nos return 1; } return 1; }
NOTE : the codes are NOT compiled!
|
no shit... they are not compiled -.- I think everybody can see that
Re: [HELP] Nitro and Repair system -
iZN - 24.01.2012
Quote:
Originally Posted by milanosie
no shit... they are not compiled -.- I think everybody can see that
|
He mean that its not tested.
Re: [HELP] Nitro and Repair system -
arjanforgames - 24.01.2012
Testing it