Jump to content
  • 0

Problema /factions


Extremys

Question

Problema intalnita (descriere): Am adaugat comanda /factions(sunt incepator) Am compilat fara nici un fel de problema dar cand intru pe server si folosesc comanda /factions imi da crash
Ero(area / rile) / warning-(ul / urile):Nu imi da eroare cand compilez
Liniile de cod / sursa / script-ul(obligatoriu):if(strcmp(cmd, "/factions", true) == 0 || strcmp(cmd, "/factiuni", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
       ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Factiuni", "Los Santos Police Departament\nLas Venturas Police Departament\nTaxi Los Santos/nTaxi Las Venturas/nThe Russian Mafia/nThe Italian Mafia/nLos Vagos/nLos Astecaz/nGrove Street/nParamedic Departament/nSchool Instructor", "Select", "Close");
    }
        return 1;
    }
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Da am incercat dar nu imi pot explica, am impresia ca am gresit. Va rog daca se paote sa remediez problema sau sa imi facti voi o comanda ?

problema.bmp

giphy.gif

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

 

Acum 1 oră, Chuck_James a spus:

Ai moduri?

Nu nu am

Am mai iincercat eu cate ceva am reusit sa fac ce vroiam dar nustiu cum sa fac sa imi apara mai multe factiuni ca in poza. Mie imi apare doar 1 nustiu cum sa scriu sa imi apara toate factiunile asa ca in poza. Adica nush cum sa continui comanda.

:
:
Am folosit comanda asta: 

if(strcmp(cmd, "/factions", true) == 0 || strcmp(cmd, "/factiuni", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        ShowPlayerDialog(playerid,3, DIALOG_STYLE_LIST, "Factiuni","Los Santos Police Departament","Select","Cancel");

    }
    return 1;

 

index.jpeg

Edited by Extremys
Am uitat cateva cuvinte

giphy.gif

Link to comment
Share on other sites

  • 0

Exemplu :

 

new string[512];
strcat(string, "Police Department");
strcat(string, "Federal Bureau of Investigations");
strcat(string, "bla bla");
ShowPlayerDialog(playerid, iddialog, DIALOG_STYLE_LIST, string, "Ok", " ");

 Daca nu iti apar toate factiunile dupa compilare, maresti string-ul (pui o valoare mai mare intre parantezele patrate la "new string" ) .

Edited by NoNamed
Link to comment
Share on other sites

  • 0
Chiar acum, NoNamed a spus:

Exemplu :

 


new string[512];
strcat(string, "Police Department");
strcat(string, "Federal Bureau of Investigations");
strcat(string, "bla bla");
ShowPlayerDialog(playerid, iddialog, DIALOG_STYLE_LIST, string, "Ok", " ");

 

Astea toate in loc de ce am scris eu?

 

giphy.gif

Link to comment
Share on other sites

  • 0
4 minutes ago, Extremys said:

Astea toate in loc de ce am scris eu?

 

Da, deci faci cate o linie da-ia noua cu strcat cum am facut eu, exact la fel, doar ca schimbi numele factiunii, si faci asa pana la ultima , apoi, la ShowPlayerDialog, in loc sa ai liniile alea lungi cu numele factiunilor, stergi toate factiunile de acolo si pui doar string , compilezi si vezi daca merge. 

Link to comment
Share on other sites

  • 0

Poti face:

Citat

new string[512];
strcat(string, "Police Department");
strcat(string, "Federal Bureau of Investigations");
strcat(string, "blablabla");
ShowPlayerDialog(playerid, iddialog, DIALOG_STYLE_LIST, "{00FF00}Factiuni:", string, "Select", "Cancel");

 

Sau poti face asa:

Citat

if(strcmp(cmd, "/factions", true) == 0 || strcmp(cmd, "/factiuni", true) == 0)
    {
        if(IsPlayerConnected(playerid))

       {
        ShowPlayerDialog(playerid,3, DIALOG_STYLE_LIST, "Factiuni","Los Santos Police Departament\nF.B.I\nTaxi Los Santos\n","Select","Cancel");

       }
      return 1;

   }

Sa pui dupa fiecare nume de factiune "\n".

Daca ai erori PM.

Sper ca te-am ajutat, bafta! :)

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.