Jump to content

Ediția 8 de Miss & Mister B-Zone a început. Detalii aici

 

Recrutăm Designeri Audio și Video. Detalii aici

Sign in to follow this  
Capital

[PAWN] Tutorial comanda [/speed]

Recommended Posts

Salut, aici va explic cum pueti face o comanda pentru modul dumneavoastra de joc pentru a avea multa viteza fara cheat. Este un totorial foarte simplu, dar poate ajuta.

 

1. pas

new SpeedBoost[MAX_PLAYERS];

2. pas

 

Cautam `public OnPlayerKeyStateChange` si adaugam: 

if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(newkeys & KEY_FIRE)
        {
            if(SpeedBoost[playerid] == 1)
            {
                new Float:vx, Float:vy, Float:vz;
                GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
                SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.8, vy *1.8, vz * 1.8);
            }
        }
    }

 

3. pas

Asaugam comanda, aceasta este:

 

CMD:speed(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 6)
    {
        if(SpeedBoost[playerid])
        {
            SpeedBoost[playerid] = 0; // Dezactivat
            SCM(playerid, COLOR_RED, "[Speed Boost]Ai dezactivat comanda Speed Boost!");
        }
        else
        {
            SpeedBoost[playerid] = 1; // Activat
            SCM(playerid, COLOR_GREEN, "[Speed Boost]Ai activat comanda Speed Boost!");
        }
    }
    return 1;
}

Share this post


Link to post
Share on other sites

Frumos si simplu, dar cam prea simplu. Si un lucru pe care l-am observat si la celalalt 'tutorial', este cum notezi pasii, ceea ce nu inteleg.

De ce pui "1. pas" si nu "Pasul I", "Pasul 1", "I" sau orice alta notatie.

 

In continuare sa ai succes si o frumoasa seara iti doresc eu tie!

Share this post


Link to post
Share on other sites

T/C.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

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.