SA-MP Forums Archive
I need anti hydra! - 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: I need anti hydra! (/showthread.php?tid=169637)



Solved. - HyperZ - 20.08.2010

Fixed.


Re: I need anti hydra! - aceisnice - 20.08.2010

wut do u mean


Re: I need anti hydra! - HyperZ - 20.08.2010

On player enter in hydra

Set player health 00 xxD


Re: I need anti hydra! - playbox12 - 20.08.2010

I failed I was looking at the wrong topic LOL


Re: I need anti hydra! - Claude - 20.08.2010

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 520))
    {
        SetVehicleHealth(vehicleid, 0);
        SetPlayerHealth(playerid, 0);
        DestroyVehicle(vehicleid);
    }
    return 1;
}
If you don't destroy it it keeps there forever


Re: I need anti hydra! - R@ger - 20.08.2010

Код:
if (GetVehicleModel(vehicleid) == 520 ) // Hydra
		{
			SetPlayerHealth(playerid,0.0);
                        return 1;
                }
this might help you


Re: I need anti hydra! - playbox12 - 20.08.2010

Quote:
Originally Posted by Claude
Посмотреть сообщение
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 520))
    {
        SetVehicleHealth(vehicleid, 0);
        SetPlayerHealth(playerid, 0);
        DestroyVehicle(vehicleid);
    }
    return 1;
}
If you don't destroy it it keeps there forever
Would be handy, otherwise it also destroys if you are an passenger

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 520))
        if (playerState == PLAYER_STATE_DRIVER))
    {
        SetVehicleHealth(vehicleid, 0);
        SetPlayerHealth(playerid, 0);
        DestroyVehicle(vehicleid);
    }
    return 1;
}
If you get an error tell me, I did it fast

Edit: I just realised you don't have passenger seats in hydra's -.-


Re: I need anti hydra! - [NWA]Hannes - 20.08.2010

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 520)
        {
            SetPlayerHealth(playerid, 0);
            DestroyVehicle(vehicleid);
        }
    }
    return 1;
}



Re: I need anti hydra! - HyperZ - 20.08.2010

Thanks.


Re: I need anti hydra! - gamer931215 - 20.08.2010

Sorry to ask, but if you dont want players to getin a n hydra, why are you spawning them ?