[HELP] Nitro and Repair system
#1

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
Reply
#2

Use OnPlayerPickUpPickup
Reply
#3

just use RepairVehicle and AddVehicleComponent(carid, 1010) 1010 is NOS
Reply
#4

Some more help please? Part of script?
Reply
#5

Bump
Reply
#6

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!
Reply
#7

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
Reply
#8

Quote:
Originally Posted by milanosie
Посмотреть сообщение
no shit... they are not compiled -.- I think everybody can see that
He mean that its not tested.
Reply
#9

Testing it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)