SA-MP Forums Archive
Error SAMP serious! - 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)
+--- Thread: Error SAMP serious! (/showthread.php?tid=578087)



Error SAMP serious! - JoshNudock - 16.06.2015

PHP код:
public OnVehicleDamageStatusUpdate(vehicleidplayerid)
{
    for (new 
0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i) && IsPlayerInVehicle(ivehicleid))
        {
            if (
CintoPlayerid[i] == 0)
            {
                
VerificarVelocidade(playerid);
            }
            else if (
Capacetes[i] == && IsAMotos(GetPlayerVehicleID(i)))
            {
                
VerificarVelocidade(playerid);
            }
        }
    }
    return 
1;
}
VerificarVelocidade(i)
{
    new 
Floathealth;
    if (
GetPlayerSpeed(itrue) >= 50)
    {
        
GetPlayerHealth(ihealth);
        
SetPlayerHealth(ihealth 7);
    }
    else if (
GetPlayerSpeed(itrue) >= 70)
    {
        
GetPlayerHealth(ihealth);
        
SetPlayerHealth(ihealth 15);
    }
    else if (
GetPlayerSpeed(itrue) >= 110)
    {
        
GetPlayerHealth(ihealth);
        
SetPlayerHealth(ihealth 20);
    }
    else if (
GetPlayerSpeed(itrue) >= 150)
    {
        
GetPlayerHealth(ihealth);
        
SetPlayerHealth(ihealth 30);
    }
    else if (
GetPlayerSpeed(itrue) >= 170)
    {
        
GetPlayerHealth(ihealth);
        
SetPlayerHealth(ihealth 35);
    }
    return 
1;

Hello !! I need urgent help .. you have here is a code in error when a driver takes a impaquito of a vehicle crash, the life decreases, more is only for motorissta, how do I get to mostorista and passenger? please tried to do but it's very complex, samp passing of laws!

@edit

Up!


Re: Error SAMP serious! - Lajko1 - 16.06.2015

Well check if players is driver / passenger that will help you to reduce HP to right person.


Re: Error SAMP serious! - JoshNudock - 16.06.2015

Ok

@edit

I could not here ..


Re: Error SAMP serious! - Sithis - 17.06.2015

Ask someone to properly translate your question instead of using ****** translate. We can't understand what you want.


Re: Error SAMP serious! - JoshNudock - 17.06.2015

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Ask someone to properly translate your question instead of using ****** translate. We can't understand what you want.
I'm using ******, I wanted to help, I can not get into the passenger also lose life