How to lock car? and make car undamagable -
NeymarJr - 04.06.2012
Hey guys,
I need help and I really want to know the command to lock a vehicle, I want to put it on my server and I also want to know how to put Infinite Car Health so that it will not take any damage?
Also I just downloaded a Car Menu Script and I want to edit it and I wanna know how to destroy the previous car I spawned after spawning a new car?
Help please. I'll REP+1 If it works for me
Re: How to lock car? and INF Vehicle HP -
Neo Karls - 04.06.2012
https://sampwiki.blast.hk/wiki/SetVehicleHealth
Try setting the value of health to a large value.
You need to get the Vehicle id(Plate) to destroy the cars that you have spawned
it will be like this
example:-
if the createdcar vehicle id is stored
pawn Код:
CMD:destroycars(playerid, params[])
for(new i = 0; i < sizeof(CreatedCars); i++) {
if(CreatedCars[i] != INVALID_VEHICLE_ID) {
DestroyVehicle(CreatedCars[i]);
CreatedCars[i] = INVALID_VEHICLE_ID;
}
}
SendClientMessageEx(playerid, COLOR_GREY, " Created vehicles destroyed!");
return 1;
here is example of lock system
http://pastebin.com/f104e7ce2
Re: How to lock car? and INF Vehicle HP -
CoaPsyFactor - 04.06.2012
Here you can see lock command a...
nd description of two functions
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer , and use
https://sampwiki.blast.hk/wiki/SetVehicleHealth to define vehicle's health
Re: How to lock car? and INF Vehicle HP -
NeymarJr - 05.06.2012
Quote:
Originally Posted by ******
Try set the health to (exactly) "(Float:0x7F800000)". That is the IEEE754 definition of infinity.
|
I put that on the cmd to set the health like exactly what you wrote, but the car still takes damage ...
Re: How to lock car? and INF Vehicle HP -
NeymarJr - 05.06.2012
Quote:
Originally Posted by CoaPsyFactor
|
I tried using the SetVehicleParamsForPlayer and I always get error and also the health I want it to be infinity so when it takes damage it repairs itself.... I want to know the exact cmd for locking it and having infinite car health
Re: How to lock car? and INF Vehicle HP -
NeymarJr - 05.06.2012
Quote:
Originally Posted by Neo Karls
https://sampwiki.blast.hk/wiki/SetVehicleHealth
Try setting the value of health to a large value.
You need to get the Vehicle id(Plate) to destroy the cars that you have spawned
it will be like this
example:-
if the createdcar vehicle id is stored
pawn Код:
CMD:destroycars(playerid, params[]) for(new i = 0; i < sizeof(CreatedCars); i++) { if(CreatedCars[i] != INVALID_VEHICLE_ID) { DestroyVehicle(CreatedCars[i]); CreatedCars[i] = INVALID_VEHICLE_ID; } } SendClientMessageEx(playerid, COLOR_GREY, " Created vehicles destroyed!"); return 1;
here is example of lock system
http://pastebin.com/f104e7ce2
|
I am a beginner for using pawno and dont know where to put stuff and I meant destroy car when you spawn another car, so when you are currently in a vehicle and you spawn another vehicle, your other vehicle will disappear.... and I am confused with lock system and also about the car health, i meant no damage as in repairing itself straight away when it takes damage
Re: How to lock car? and INF Vehicle HP -
NeymarJr - 05.06.2012
Quote:
Originally Posted by ******
No damage and infinite health are not the same thing. You can have a seriously battered car, but it will never blow up.
|
Oh, sorry I thought they were the same, do you know how to make it get no damage?
Re: How to lock car? and INF Vehicle HP -
NeymarJr - 05.06.2012
Bump
Re: How to lock car? and INF Vehicle HP -
NeymarJr - 06.06.2012
Bump
Re: How to lock car? and INF Vehicle HP -
Riddick94 - 06.06.2012
Check in timer your current vehicle status. If something has been changed (like health) set it to your value again. Timer must be looping. Or check it by
GetVehicleDamageStatus