[Help] Too much text in one line
#1

Im doing /ah command and I'm stuck here at this point.
So... This is the Code (sorry if it looks unproffesional, I don't even know if this is correct):
Код:
new ah10[256];
format(ah10,sizeof(ah10), "/a /aname /aduty /apm /kick /(un)ban(reason/ip) /(s)check /slap /spec /ar /dr /(n)mute /stopfire\n");
new ah11[256];
format(ah11,sizeof(ah11), "/goto(loc) /gethere /revive /refund /ipcheck /ch /freeze /unfreeze /fa /ufa /healnear /startfire\n");
new ah12[256];
format(ah12,sizeof(ah12), "/setvw /setint /makevip /disarm /gotoveh /getveh /sendtols /tuteject /forcetut /listen /lastseen\n");
new ah13[256];
format(ah13,sizeof(ah13), "/setskin /banaccount /prison(account) /approve /deny /prisoners /contracts /clearcontract\n");
new ah14[256];
format(ah14,sizeof(ah14), "/clearwanted /respawn(radius) /gotopos /sendtoid /veh /interiors /pfine /fine /listguns\n");
new ah15[256];
format(ah15,sizeof(ah15), "/(show/clear)flag(s) /reportmute /(clear)warn(s) /refuel /givecookie /tog /tabbed /afk");
ShowPlayerDialog(playerid, ADMINHELP_LVL1, DIALOG_STYLE_MSGBOX, "Android Balkan RP - Admin Level 1", "ah10 ah11 ah12 ah13 ah14 ah15", "Ok", "Izadji");
//I know this last line is not correct but I made it there so you can see what I'm trying to do
Let me explain a bit. I was trying to get this text:
Код:
/a /aname /aduty /apm /kick /(un)ban(reason/ip) /(s)check /slap /spec /ar /dr /(n)mute /stopfire\n
/goto(loc) /gethere /revive /refund /ipcheck /ch /freeze /unfreeze /fa /ufa /healnear /startfire\n
/setvw /setint /makevip /disarm /gotoveh /getveh /sendtols /tuteject /forcetut /listen /lastseen\n
/setskin /banaccount /prison(account) /approve /deny /prisoners /contracts /clearcontract\n
/clearwanted /respawn(radius) /gotopos /sendtoid /veh /interiors /pfine /fine /listguns\n
/(show/clear)flag(s) /reportmute /(clear)warn(s) /refuel /givecookie /tog /tabbed /afk
In one msg box but I cant do it in one line so I was trying out stuff and now I'm here with this noobish code and no clue what now.
I have 2 questions:
-Is this the right way? If it's not then can you explain how to do it right?
-Is it possible to put strings inside of one line and use New Line (\n or ~n~) or smthing like that)?
Reply
#2

pawn Код:
new ah[600];
and use that function strcat
Reply
#3

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
pawn Код:
new ah[600];
and use that function strcat
Can you make me a code for AdminLvl1 as an example, please?
Reply
#4

pawn Код:
new ah[600];

strcat(ah, "/a /aname /aduty /apm /kick /(un)ban(reason/ip) /(s)check /slap /spec /ar /dr /(n)mute /stopfire\n");

strcat(ah, "/goto(loc) /gethere /revive /refund /ipcheck /ch /freeze /unfreeze /fa /ufa /healnear /startfire\n");

strcat(ah, "/setvw /setint /makevip /disarm /gotoveh /getveh /sendtols /tuteject /forcetut /listen /lastseen\n");

strcat(ah, "/setskin /banaccount /prison(account) /approve /deny /prisoners /contracts /clearcontract\n");

strcat(ah, "/clearwanted /respawn(radius) /gotopos /sendtoid /veh /interiors /pfine /fine /listguns\n");

strcat(ah, "/(show/clear)flag(s) /reportmute /(clear)warn(s) /refuel /givecookie /tog /tabbed /afk");
The variable ah contains everything, did you understand how the function works ?
Reply
#5

Yeah, thank you. I was doing the same thing but with format function and it just printed the last line. Thank you once again

So this should be for /ah dialog 2?
Код:
				new ah2[600];
				strcat(ah2, "/****** /infotoall /interiors /mark /time /jetpack /sethp /setarmor /listmasked\n");
				strcat(ah2, "/hoseject /lastads /clearchat /whitelist /givenos /sendtoid /speedhack /setfightstyle\n");
				strcat(ah2, "/veh /setname /vehname /rangeban /editdrugs /cnnn /clearads /online /editpoint /setstat");
				ShowPlayerDialog(playerid, ADMINHELP_LVL2, DIALOG_STYLE_MSGBOX, "Android Balkan RP - Admin Level 2", ah2, "Ok", "Izadji");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)