Something wrong this this code
#1

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

What error?
Reply
#3

Copy & Paste the error
Reply
#4

here
pawn Код:
C:\Users\BestFamily\Dropbox\SCRIPT\SGRP2.pwn(86889) : warning 203: symbol is never used: "Vehicle_Armor"
Reply
#5

The warning is very clear, Symbol is never used
Reply
#6

no shit really? where do i put and how can iget certain VEHICLE IDS to have certain heal upon restart?
Reply
#7

OnVehicleSpawn, maybe
Reply
#8

pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
    SetVehicleHealth(2, 1000.0);
    SendClientMessage(playerid, COLOUR_WHITE, "This car has 1000 ph live ");
    return 1;
Reply
#9

wha phenix i dnt get it
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)