SA-MP Forums Archive
does anyone know how to put the vehicle's health shopwn as the player's health ? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: does anyone know how to put the vehicle's health shopwn as the player's health ? (/showthread.php?tid=121393)



does anyone know how to put the vehicle's health shopwn as the player's health ? - AlbanianGuy - 16.01.2010

can anyone help me ? its like when the health of the car is zero u die or what ever , and another thing how to make the players die when they exit vehicles ?


Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - GTAguillaume - 16.01.2010


EDIT: add this to OnPlayerExitVehicle:
Код:
new Float:X;
GetVehicleHealth(vehicleid,X);
if(X == 0.0)SetPlayerHealth(playerid,0.0);



Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - AlbanianGuy - 16.01.2010

it doesnt work , what can i do now ? it says invalid function or decleretion ....


Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - MadeMan - 16.01.2010

You want that players die when they exit vehicle?

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    SetPlayerHealth(playerid, 0.0);
    return 1;
}



Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - AlbanianGuy - 16.01.2010

mademan , what do u mean show the code , cuz i am a new scripter ...


Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - MadeMan - 16.01.2010

Quote:
Originally Posted by AlbanianGuy
mademan , what do u mean show the code , cuz i am a new scripter ...
Copy the code from your script and paste it here.


Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - AlbanianGuy - 16.01.2010

i dont have codes , ..... do u mean those to the right of the screen ? , i dont have those ... can u do it for me , pls .


Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - MadeMan - 16.01.2010

Do you know what script means?


Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - AlbanianGuy - 16.01.2010

nono i am jsut saying htat i dont know how to put it there , can u help me how to and hwere to put it ? pls


Re: does anyone know how to put the vehicle's health shopwn as the player's health ? - Fedee! - 16.01.2010

Quote:
Originally Posted by AlbanianGuy
nono i am jsut saying htat i dont know how to put it there , can u help me how to and hwere to put it ? pls
Lol man, open pawno, then open your GM or FS, do CTRLl+F, put "public OnPlayerExitVehicle(playerid, vehicleid)" (without " ") , and then paste this:

Quote:

public OnPlayerExitVehicle(playerid, vehicleid)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}

You press F5, (not F and then 5), and it will be compiled, then you open server.cfg and on FS line just put the name of that *.pwn.

Wasent easy?

Bye