[pomoc] komanda

Započeo .G.h.0.s.T., Mart 04, 2011, 22:58:13 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: godfather --> editujem
Detaljan opis problema: htio bi cmd /adminhelp napraviti u Dialog_style_msgbox. i da kad upisem /adminhelp, da mi on pokazuje komande po ranku admina. recimo ako je igrac level 4 admin. onda da mu samo pokaze od 1 levela do 4. xD. i to sam nesto pokusavao napraviti, ali ne ide bas. pa ako netko zna na koji nacin se moze napraviti, bio bih mu jako zahvalan.
Dio skripte:

CMD:ah(playerid, params[])
{
new string[128];
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi ulogiran jos!");
  return 1;
}
new message[] = "{FFCC00}*** ADMIN DUTY *** {FFFFFF}/aduty \n{FFCC00}*** ADMIN CHAT *** {FFFFFF}/a";

/* SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");*/
if (GetPVarInt(playerid, "Admin") >= 1)
    {
    new message1[] = "{FF0000}*** 1 LEVEL ADMIN *** {FFFFFF}/cc /check /setint /mute /kick /kickres /a(dmin) chat";
/* SendClientMessage(playerid, COLOR_GRAD1, "*1* ADMIN *** /cc /check /setint /mute /kick /kickres /a(dmin) chat";*/
}
if (GetPVarInt(playerid, "Admin") >= 2)
{
    new message2[] = "{FF0000}*** 2 LEVEL ADMIN *** {FFFFFF}/warn /rtc/gmon /gmoff /goto /skydive /ban /setteam /bigears /freeze /unfreeze /recon /cam";
/*SendClientMessage(playerid, COLOR_GRAD2,"*2* ADMIN ***  /warn /rtc/gmon /gmoff /goto /skydive /ban /setteam /bigears /freeze /unfreeze /recon /cam");*/
}
/* if (PlayerInfo[playerid][pAdmin] >= 3)
{
SendClientMessage(playerid, COLOR_GRAD3,"*3* ADMIN *** /ro /rz /aeo /aez /raceo /racez /noooc /fourdive /sp /gotols /jail /cnn /prison /unprison");
SendClientMessage(playerid, COLOR_GRAD4,"*3* ADMIN *** /endround /cnn /mark /gotomark /gotolv /gotosf /gethere /oldcar /gotocar /getcar");
SendClientMessage(playerid, COLOR_GRAD4,"*3* ADMIN *** /burgo1 /burgz1 /setcompetitor /gotoburg /gotoaero");
}
if (PlayerInfo[playerid][pAdmin] >= 4)
{

    SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /hq /logout /logoutpl /logoutall /edit /fuelcars /asellhouse /asellbiz /sellsbiz /setchamp /mk");
    SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /fixveh /destroycars /sethp /setarmor /givegun /givemoney /money(sets money) /forceskin /setfamily");
                SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /healall ");
}
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /setstat /mole /veh /weather /weatherall /makeleader /tod /savemission /loadmission /startlotto");
                SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /givemoney /money(sets money)");
}
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
SendClientMessage(playerid, COLOR_GRAD6,"***1338 /cnnn /makeadmin /makemaster /unban");
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");*/
  /*format(string, sizeof(string),"%s %s %s",message,message1);*/
    ShowPlayerDialog(playerid,ADMINHELP,DIALOG_STYLE_MSGBOX,"{FFFFFF}ADMIN KOMANDE",message,message1,"OK");
return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno): //

ovako sam nesto pokusao. i dobijem errore, da mi je message1 ne definiran, i da nigdje nije upotrebljen. hvala.
Poslednja Izmena: Mart 05, 2011, 00:48:06 PRE PODNE od [NS]Michael

CMD:ah(playerid, params[])
{
new string[128],stringe[128],string1[128],string2[128],string3[128],string4[128],string5[128],string6[128], string7[128], string8[128],string9[128];
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi ulogiran jos!");
  return 1;
}
                format(stringe, sizeof(stringe), "{FFCC00}*** ADMIN DUTY *** {FFFFFF}/aduty \n{FFCC00}*** ADMIN CHAT *** {FFFFFF}/a";

if (GetPVarInt(playerid, "Admin") >= 1)
    {
    format(string, sizeof(string), "{FF0000}*** 1 LEVEL ADMIN *** {FFFFFF}/cc /check /setint /mute /kick /kickres /a(dmin) chat");
/* SendClientMessage(playerid, COLOR_GRAD1, "*1* ADMIN *** /cc /check /setint /mute /kick /kickres /a(dmin) chat";*/
}
if (GetPVarInt(playerid, "Admin") >= 2)
{
    format(string1, sizeof(string1), "{FF0000}*** 2 LEVEL ADMIN *** {FFFFFF}/warn /rtc/gmon /gmoff /goto /skydive /ban /setteam /bigears /freeze /unfreeze /recon /cam";

}
/* if (PlayerInfo[playerid][pAdmin] >= 3)
{
format(string2, sizeof(string2), "*3* ADMIN *** /ro /rz /aeo /aez /raceo /racez /noooc /fourdive /sp /gotols /jail /cnn /prison /unprison");
format(string3, sizeof(string3), "*3* ADMIN *** /endround /cnn /mark /gotomark /gotolv /gotosf /gethere /oldcar /gotocar /getcar");
format(string4, sizeof(string4), "*3* ADMIN *** /burgo1 /burgz1 /setcompetitor /gotoburg /gotoaero");
}
if (PlayerInfo[playerid][pAdmin] >= 4)
{

    format(string5, sizeof(string5), " COLOR_GRAD4,"*4* ADMIN *** /hq /logout /logoutpl /logoutall /edit /fuelcars /asellhouse /asellbiz /sellsbiz /setchamp /mk");
    format(string6, sizeof(string6), " COLOR_GRAD4,"*4* ADMIN *** /fixveh /destroycars /sethp /setarmor /givegun /givemoney /money(sets money) /forceskin /setfamily");
                SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /healall ");
}
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
format(string7, sizeof(string7), " COLOR_GRAD5,"*** 1337+ *** /setstat /mole /veh /weather /weatherall /makeleader /tod /savemission /loadmission /startlotto");
                SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /givemoney /money(sets money)");
}
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
format(string8, sizeof(string8), " COLOR_GRAD6,"***1338 /cnnn /makeadmin /makemaster /unban");
}
format(string9, sizeof(string9), " COLOR_GREEN,"_______________________________________");*/

    ShowPlayerDialog(playerid,ADMINHELP,DIALOG_STYLE_MSGBOX,"{FFFFFF}%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",string1, string2, string3, string4, string5, string6, string7, string8, string9,"OK");
return 1;
}


Probaj ovako, nemam sada vremena da sve namjestam, ali ovako bi ti trebalo raditi

Citatnew string[128],stringe[128],string1[128],string2[128],string3[128],string4[128],string5[128],string6[128], string7[128], string8[128],string9[128];
pretjerujes  ???

Sve ovo stane u 1 string od 512 xd  :D

Ne stane... Maksimalna velicina stringa je 128

Citat: [ЯPF]  K4Я!K3 poslato Mart 05, 2011, 12:40:22 POSLE PODNE
Citatnew string[128],stringe[128],string1[128],string2[128],string3[128],string4[128],string5[128],string6[128], string7[128], string8[128],string9[128];
pretjerujes  ???

Sve ovo stane u 1 string od 512 xd  :D


kako to mislis?



CitatNe stane... Maksimalna velicina stringa je 128


u cemu ti skriptas? :O

Citat: Kalcor na Danas u 02:49:13
Citat: ProGaming|Pacino na Danas u 01:50:18
Ne stane... Maksimalna velicina stringa je 128

Klik

Mislio sam na prikaz slova i na optimizaciju! :S

Citat: ProGaming|Pacino poslato Mart 05, 2011, 12:31:47 POSLE PODNE
CMD:ah(playerid, params[])
{
new string[128],stringe[128],string1[128],string2[128],string3[128],string4[128],string5[128],string6[128], string7[128], string8[128],string9[128];
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi ulogiran jos!");
  return 1;
}
                format(stringe, sizeof(stringe), "{FFCC00}*** ADMIN DUTY *** {FFFFFF}/aduty \n{FFCC00}*** ADMIN CHAT *** {FFFFFF}/a";

if (GetPVarInt(playerid, "Admin") >= 1)
    {
    format(string, sizeof(string), "{FF0000}*** 1 LEVEL ADMIN *** {FFFFFF}/cc /check /setint /mute /kick /kickres /a(dmin) chat");
/* SendClientMessage(playerid, COLOR_GRAD1, "*1* ADMIN *** /cc /check /setint /mute /kick /kickres /a(dmin) chat";*/
}
if (GetPVarInt(playerid, "Admin") >= 2)
{
    format(string1, sizeof(string1), "{FF0000}*** 2 LEVEL ADMIN *** {FFFFFF}/warn /rtc/gmon /gmoff /goto /skydive /ban /setteam /bigears /freeze /unfreeze /recon /cam";

}
/* if (PlayerInfo[playerid][pAdmin] >= 3)
{
format(string2, sizeof(string2), "*3* ADMIN *** /ro /rz /aeo /aez /raceo /racez /noooc /fourdive /sp /gotols /jail /cnn /prison /unprison");
format(string3, sizeof(string3), "*3* ADMIN *** /endround /cnn /mark /gotomark /gotolv /gotosf /gethere /oldcar /gotocar /getcar");
format(string4, sizeof(string4), "*3* ADMIN *** /burgo1 /burgz1 /setcompetitor /gotoburg /gotoaero");
}
if (PlayerInfo[playerid][pAdmin] >= 4)
{

    format(string5, sizeof(string5), " COLOR_GRAD4,"*4* ADMIN *** /hq /logout /logoutpl /logoutall /edit /fuelcars /asellhouse /asellbiz /sellsbiz /setchamp /mk");
    format(string6, sizeof(string6), " COLOR_GRAD4,"*4* ADMIN *** /fixveh /destroycars /sethp /setarmor /givegun /givemoney /money(sets money) /forceskin /setfamily");
                SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /healall ");
}
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
format(string7, sizeof(string7), " COLOR_GRAD5,"*** 1337+ *** /setstat /mole /veh /weather /weatherall /makeleader /tod /savemission /loadmission /startlotto");
                SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /givemoney /money(sets money)");
}
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
format(string8, sizeof(string8), " COLOR_GRAD6,"***1338 /cnnn /makeadmin /makemaster /unban");
}
format(string9, sizeof(string9), " COLOR_GREEN,"_______________________________________");*/

    ShowPlayerDialog(playerid,ADMINHELP,DIALOG_STYLE_MSGBOX,"{FFFFFF}%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",string1, string2, string3, string4, string5, string6, string7, string8, string9,"OK");
return 1;
}


Probaj ovako, nemam sada vremena da sve namjestam, ali ovako bi ti trebalo raditi

bas i ne radi....xD

i jer ima netko ideju kako bi mogao tu cmd napraviti u dialogu???