Jump to content

[Tutorial] Cum sa creezi o zona dm


khain.dev

Recommended Posts

Salutare,astazi va voi invata cum sa creati o zona dm,este foarte simplu,sa trecem la treaba!

Citat

// Deci vem nevoie de variabila

new bool: ZonaDm[MAX_PLAYERS char];

Citat

// Plecam in OnPlayerSpawn

if(ZonaDm{playerid})return SpawnZonaDm(playerid); // atunci cind jucatorul moare sa apara tot in zona de dm
 

Citat

// Avem nevoie si de comenzi pentru teleportate

CMD:godm(playerid, params[])
{
    if(DeathMatch{playerid})
    return SendClientMessage(playerid, -1, !"Deja sunteti in aceasta zona."); 

     DeathMatch{playerid} = true;
    SendClientMessage(playerid, -1, !"Bun venit in zona de deathmatch numarul 1."); 
    return SpawnDeathMatch(playerid);
}

CMD:exitdm(playerid, params[])
{
    if(!DeathMatch{playerid})
    return SendClientMessage(playerid, -1, !"Nu sunteti in zona de deathmatch!");

    DeathMatch{playerid} = false;
    SendClientMessage(playerid, -1, !"Ai iesit din zona de deathmatch numarul 1!");
    SpawnPlayer(playerid);
    return 1;
}

Citat

// In orice loc al modului chiar si la sfirsit

stock SpawnZonaDm(const playerid)
{

        GivePlayerWeapon(playerid, 24, 999);   // adaugam jucatorului arma la dorinta eu am pus doar sa primeasca deagle voi adaugati deja si alte arme
        SetPlayerHealth(playerid, 100); // adugam dupa spawn ca jucatorul sa primeasca 100 hp
        SetPlayerHealth(playerid, 100); // adugam dupa spawn ca jucatorul sa armour 100 procente ( la dorinta )
        SetPlayerWeather(playerid, 2); // adaugam vreamea jucatorului ( la dorinta )
        SetPlayerVirtualWorld(playerid, 0); // adaugam lume virtuala jucatorului ( la dorinta )
        switch(random(1)) // coordonatele
        {
        case 0: SetPlayerPos(playerid,  x, y, z); // unde o sa apara jucatorul
        }
    return 1;
}

Mersi de atentie,astept macar un "+" de staruinta ?

Edited by Khain Developer
  • Like 1
  • Upvote 1
Link to comment
Share on other sites

On 1/9/2019 at 12:59 AM, DevilOfStars said:

Ai uitat sa traduci cv, o fi din cauza ca nu mai mergea google translete?

Lasa-l man, ca doar a dat un copy + paste de pe un gm rus, doar ca nu a tradus tot in romana! :)

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.