Jump to content
  • 0

Ajutor tutorial


dontz

Question

3 answers to this question

Recommended Posts

Deci,iti arat un tutorial cum sa pui muzica pentru toata lumea pe server,deci incepem.....

1.Cautam in GM oriunde unde de defineste ceva,exemplu:

#define ADMIN_SPEC_TYPE_NONE 0

2.Dupa el adaugam:

:#define DIALOG_MUSIC 4002

(acum am definit dialogul dintre player si comanda.

3.Cautam linia:

public OnDialogResponse

4.Dupa UN DIALOG creeam dialogul nostru.Exemplu:

Dupa

if(dialogid == DMVDIALOG1)

{

if(response)

{

ShowPlayerDialog(playerid,DMVDIALOG2,DIALOG_STYLE_MSGBOX,"Intrebarea numarul 1","{77A3F0}Pe ce banda este normal sa conduci.","Dreapta", "Stanga");

return 1;

}

}

Adaugam

if(dialogid == DIALOG_MUSIC)

{

strval(inputtext);

for(new i = 0; i < MAX_PLAYERS; i++)

    {

if(IsPlayerConnected(i))

{

PlayAudioStreamForPlayer(i, inputtext);

}

}

}

5.Acuma trebuie sa creeam comanda care face ca playerul sa auda melodia.

Cautam linia:

OnPlayerCommandtext

6.Si adaugam comanda /melodie.Exemplu:

Dupa

if(strcmp(cmd, "/animhelp", true) == 0)

{

    if(IsPlayerConnected(playerid))

{

            SendClientMessage(playerid, CRISTIAN,"_______________________________________");

            SendClientMessage(playerid, COLOR_WHITE,"*** HELP *** type a command for more help");

SendClientMessage(playerid, COLOR_CRS3,"*** ANIMATIONS *** /animlist");

}

return 1;

}

Adaugam:

///melodie//

    if (strcmp("/melodie", cmd, true) == 0)

{

if(PlayerInfo[playerid][pAdmin] >= 3)

{

  ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT ,"Muzica","Va rugam sa introduceti link-ul: ","Porneste","Renunta");

}

        return 1;

}

if (strcmp("/stopmelodie", cmd, true) == 0)

{

if(PlayerInfo[playerid][pAdmin] >= 3)

{

for(new i = 0; i < MAX_PLAYERS; i++)

    {

if(IsPlayerConnected(i))

{

StopAudioStreamForPlayer(i);

}

}

}

return 1;

}

NOTA:

1.

if(PlayerInfo[playerid][pAdmin] >= 3)

Defineste ce grad poate sa puna melodie,aceasta comanda e facut sa poata pune admin,daca vrei sa faci sa puna o factiune in loc de pAdmin pui pMember

Asa e in modul default sau cel putin in GM-urile RPG-RP-GODFATHER.

2.NU UITA SA APESI F5/F6 CA SA COMPILEAZI GAMEMOD-UL.

3.Daca nu te descurci sau iti da vreo EROARE sau nu intelegi ceva adauga id meu:

muresan_emanuel2001yahoo.com

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.