24.01.2012, 14:12
try this
Check this page https://sampwiki.blast.hk/wiki/CreatePickup
NOTE : the codes are NOT compiled!
pawn Код:
// on the top of your script
new pu;
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;
}