Something wrong this this code - 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: Something wrong this this code (
/showthread.php?tid=369775)
Something wrong this this code -
NinjaChicken - 18.08.2012
ok im trying to make certian vehicles have say 5000hp instead of 1000hp
i have this code
pawn Код:
Vehicle_Armor(iVehicleID) {
switch(GetVehicleModel(iVehicleID)) {
case 596, 597, 598: SetVehicleHealth(iVehicleID, 2000.0);
case 490: SetVehicleHealth(iVehicleID, 2500.0);
case 407, 470: SetVehicleHealth(iVehicleID, 3000.0);
case 428, 433, 447, 427: SetVehicleHealth(iVehicleID, 4000.0);
case 601, 528: SetVehicleHealth(iVehicleID, 5000.0);
case 432, 425: SetVehicleHealth(iVehicleID, 7500.0);
}
}
and i get an error message about Vehicle_Armor please help
Re: Something wrong this this code -
IceMeteor - 18.08.2012
What error?
Re: Something wrong this this code -
Mark Shade - 18.08.2012
Copy & Paste the error
Re: Something wrong this this code -
NinjaChicken - 18.08.2012
here
pawn Код:
C:\Users\BestFamily\Dropbox\SCRIPT\SGRP2.pwn(86889) : warning 203: symbol is never used: "Vehicle_Armor"
Re: Something wrong this this code -
IceMeteor - 18.08.2012
The warning is very clear, Symbol is never used
Re: Something wrong this this code -
NinjaChicken - 18.08.2012
no shit really? where do i put and how can iget certain VEHICLE IDS to have certain heal upon restart?
Re: Something wrong this this code -
IceMeteor - 18.08.2012
OnVehicleSpawn, maybe
Respuesta: Something wrong this this code -
ThePhenix - 18.08.2012
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(2, 1000.0);
SendClientMessage(playerid, COLOUR_WHITE, "This car has 1000 ph live ");
return 1;
Re: Something wrong this this code -
NinjaChicken - 18.08.2012
wha phenix i dnt get it
Re: Something wrong this this code -
Kindred - 18.08.2012
pawn Код:
public OnVehicleSpawn(vehicleid)
{
Vehicle_Armor(vehicleid);
return 1;
}
If you want it to add the health when the vehicle is spawned, do what is done about.
Else, do Vehicle_Armor(vehicleid) wherever it is needed.