Jump to content
  • 0

Problema SetVehicleVelocity


Users

Question

Sallut , am incecat sa adaug si eu SetVehicleVelocity pe un infernus si nu mi-a reusit deoarece imi da ca nu gaseste SetVehicleVelocity.

Cand am incercat sa adaug pe toate modelurile de infernus dupa server si se compileaza fara eroare.

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 4)// <- ALT, 1 pt CTRL
    {
        if(GetPlayerState(playerid) == 2)
        {
            new veid = GetPlayerVehicleID( playerid );
            if(GetVehicleModel( veid ) == 411) //infernus
            {
                new Float:X,Float:Y,Float:Z;
                GetVehicleVelocity(veid,X,Y,Z);
                SetVehicleVelocity(veid,X * 1.3, Y * 1.3, Z * 1.3);
            }
        }
    }
}

Va rog spunetimi si mie cum pot adauga doar pe o singura masina nu pe toate modelurile.

HostName: [RPG]*|| Ecila Royal Gaming ||*-WIPED

Address:  93.114.82.70:7777

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 4)// <- ALT, 1 pt CTRL
    {
        if(GetPlayerState(playerid) == 2)
        {
            new veid = GetPlayerVehicleID( playerid );
            if(veid == 44) //masina cu id 44
            {
                new Float:X,Float:Y,Float:Z;
                GetVehicleVelocity(veid,X,Y,Z);
                SetVehicleVelocity(veid,X * 1.3, Y * 1.3, Z * 1.3);
            }
        }
    }
}

Link to comment
Share on other sites

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 4)// <- ALT, 1 pt CTRL
    {
        if(GetPlayerState(playerid) == 2)
        {
            new veid = GetPlayerVehicleID( playerid );
            if(GetVehicleModel( veid ) == 411) //infernus
            {
                new Float:X,Float:Y,Float:Z;
                GetVehicleVelocity(veid,X,Y,Z);
                SetVehicleVelocity(veid,X * 1.3, Y * 1.3, Z * 1.3);
            }
        }
    }
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 4)// <- ALT, 1 pt CTRL
    {
        if(GetPlayerState(playerid) == 2)
        {
            new veid = GetPlayerVehicleID( playerid );
            if(veid == 44) //masina cu id 44
            {
                new Float:X,Float:Y,Float:Z;
                GetVehicleVelocity(veid,X,Y,Z);
                SetVehicleVelocity(veid,X * 1.3, Y * 1.3, Z * 1.3);
            }
        }
    }
}

Care este diferenta , ca primul mi l-ai facut pentru toate modelele si al doilea pentru id 44 dar kre e dif.?

Si ce inseamna Alt , 1 ptr CTRL?

HostName: [RPG]*|| Ecila Royal Gaming ||*-WIPED

Address:  93.114.82.70:7777

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.