Tank [Question]
#1

I never knew the "Rhino" tank was not bulletproof. Today, my friend and I just tested out my server and I just shot his tank multiple times and found out that its not bulletproof. At first I knew it was not explosion proof but bullet proof. Can someone correct me if I'm wrong. Is the "Rhino" tank bullet proof or not. If its not, could there be a way for me to add health to the tank? Like originally "1000" from /dl and now I probably change it to "2000" to take more damage. Could that be done?
Reply
#2

I'm guessing this would work, not sure..

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    if(GetVehicleModel(vehicleid) == 432) //if the Vehicle model is a tank
    {
        SetVehicleHealth(vehicleid, 2000); //sets the vehicles hp to 2000
    }
    return 1;
}
Reply
#3

Ok might work but you see I'm kinda using that to check that when a player enters that kind of vehicle, a score is required otherwise they can't get in. How do I combine it with the one above. I've tried "&&" and it doesn't work. Here's a look.
Код:
if(GetVehicleModel(vehicleid) == 432)
    {
		if(GetPlayerScore(playerid) < 500)
		{
            SetVehicleParamsForPlayer(vehicleid, playerid, false, true);
			SendClientMessage(playerid, 0xFF0000FF, "You must be in team army and must have the score 500 to drive a Tank!");
		}
	}
Reply
#4

pawn Код:
if(GetPlayerScore(playerid) < 500)
{
    if(GetVehicleModel(vehicleid) == 432)
        {
                SetVehicleHealth(vehicleid, 2000);
        }
}
else
{
    SetVehicleParamsForPlayer(vehicleid, playerid, false, true);
    SendClientMessage(playerid, 0xFF0000FF, "You must be in team army and must have the score 500 to drive a Tank!");  
}
Try this out.
Reply
#5

Alright will do but in the wiki it says Vehicle Health is only 1000. So could you add it? I'll try it out.
Reply
#6

The default vehicle health is 1000, but it can be set as high as ~65,000 (0xFFFF) without problems.
Driving through fire from a molotov will also kill the tank almost instantly.
Reply
#7

Vince what do you mean? I've tried the SetVehicleHealth to 2000. But it still stays at 1000. "/dl" confirms it. So what do you mean it can be set high? Please explain to me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)