/help dialog
#1

i want to put this the stats in this dialog how do i put them?
Like this,its just an exemple:
http://imageshack.us/photo/my-images...amp001eqk.png/

please help me,tp put it in dialog and down a button to press with mouse ''close''
Reply
#2

pawn Код:
ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, "Help Cmd", "Your content here", "Close", "");
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Help","Help message here.","Close","");
return 1;
    }
    return 0;
}
to make a new line in the dialog use \n
Like; line1\n line2
Reply
#4

can u help me im romanian problems understanding...

Код:
if(strcmp(cmd, "/help", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
         SendClientMessage(playerid, COLOR_GRAD1,":: ACCOUNT :: /reguli /stats /account /changename");
			SendClientMessage(playerid, COLOR_GRAD1,":: GENERAL :: /pay /charity /time /buy /unrentcar /unRentveh /switchkey /id /drink /clothes /leaders /wo /knock /doorshout /resetspawn");
			SendClientMessage(playerid, COLOR_GRAD2,":: GENERAL :: /resetupgrades(50k) /buygun /lock /skill /licenses /showlicenses /atalk /anim /stopanim /use");
			SendClientMessage(playerid, COLOR_GRAD2,":: GENERAL :: /report /cancel /accept /eject /usedrugs /contract /fill /admins (/f)actionlist /gps /chatmode /fightstyle /(de)attachweapon");
			SendClientMessage(playerid, COLOR_GRAD3,":: GENERAL ::  /coin (/inv)entory /knock /knockout /give /gateopen /sid /smoke /(sur)render /cophelp /selectspawn");
            SendClientMessage(playerid, COLOR_GRAD3,":: CAR :: /trunk ");
            SendClientMessage(playerid, COLOR_GRAD3,":: CHAT :: (/o)oc /me /(ad)vertise (/cw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone");
			SendClientMessage(playerid, COLOR_GRAD4,":: BANCA :: /balance /withdraw /deposit /wiretransfer /atm");
i want the buton close where it says on picture "inchide" please help
Reply
#5

change the ShowPlayerDialog in the code i pasted with this

pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Help",":: ACCOUNT :: /reguli /stats /account /changename\n :: GENERAL :: /pay /charity /time /buy /unrentcar /unRentveh /switchkey /id /drink /clothes /leaders /wo /knock /doorshout /resetspawn\n :: GENERAL :: /resetupgrades(50k) /buygun /lock /skill /licenses /showlicenses /atalk /anim /stopanim /use\n :: GENERAL :: /report /cancel /accept /eject /usedrugs /contract /fill /admins (/f)actionlist /gps /chatmode /fightstyle /(de)attachweapon\n :: GENERAL ::  /coin (/inv)entory /knock /knockout /give /gateopen /sid /smoke /(sur)render /cophelp /selectspawn\n :: CAR :: /trunk\n :: CHAT :: (/o)oc /me /(ad)vertise (/cw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone\n :: BANCA :: /balance /withdraw /deposit /wiretransfer /atm.","Close","");
Reply
#6

and how i put color?+i do same for stats?
Reply
#7

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Help",":: ACCOUNT :: /reguli /stats /account /changename\n :: GENERAL :: /pay /charity /time /buy /unrentcar /unRentveh /switchkey /id /drink /clothes /leaders /wo /knock /doorshout /resetspawn\n :: GENERAL :: /resetupgrades(50k) /buygun /lock /skill /licenses /showlicenses /atalk /anim /stopanim /use\n :: GENERAL :: /report /cancel /accept /eject /usedrugs /contract /fill /admins (/f)actionlist /gps /chatmode /fightstyle /(de)attachweapon\n :: GENERAL ::  /coin (/inv)entory /knock /knockout /give /gateopen /sid /smoke /(sur)render /cophelp /selectspawn\n :: CAR :: /trunk\n :: CHAT :: (/o)oc /me /(ad)vertise (/cw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone\n :: BANCA :: /balance /withdraw /deposit /wiretransfer /atm.","Close","");
return 1;
    }
    return 0;
}
Reply
#8

if(!strcmp(cmdtext, "/help", true))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"H elp",":: ACCOUNT :: /reguli /stats /account /changename\n :: GENERAL :: /pay /charity /time /buy /unrentcar /unRentveh /switchkey /id /drink /clothes /leaders /wo /knock /doorshout /resetspawn\n :: GENERAL :: /resetupgrades(50k) /buygun /lock /skill /licenses /showlicenses /atalk /anim /stopanim /use\n :: GENERAL :: /report /cancel /accept /eject /usedrugs /contract /fill /admins (/f)actionlist /gps /chatmode /fightstyle /(de)attachweapon\n :: GENERAL :: /coin (/inv)entory /knock /knockout /give /gateopen /sid /smoke /(sur)render /cophelp /selectspawn\n :: CAR :: /trunk\n :: CHAT :: (/o)oc /me /(ad)vertise (/cw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone\n :: BANCA :: /balance /withdraw /deposit /wiretransfer /atm.","Close","");
return 1;
}
return 0;
}

i put this and pawn says not responding and it stops...

this is the full /help thing please help...

Quote:

if(strcmp(cmd, "/help", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GRAD1,":: ACCOUNT :: /reguli /stats /account /changename");
SendClientMessage(playerid, COLOR_GRAD1,":: GENERAL :: /pay /charity /time /buy /unrentcar /unRentveh /switchkey /id /drink /clothes /leaders /wo /knock /doorshout /resetspawn");
SendClientMessage(playerid, COLOR_GRAD2,":: GENERAL :: /resetupgrades(50k) /buygun /lock /skill /licenses /showlicenses /atalk /anim /stopanim /use");
SendClientMessage(playerid, COLOR_GRAD2,":: GENERAL :: /report /cancel /accept /eject /usedrugs /contract /fill /admins (/f)actionlist /gps /chatmode /fightstyle /(de)attachweapon");
SendClientMessage(playerid, COLOR_GRAD3,":: GENERAL :: /coin (/inv)entory /knock /knockout /give /gateopen /sid /smoke /(sur)render /cophelp /selectspawn");
SendClientMessage(playerid, COLOR_GRAD3,":: CAR :: /trunk ");
SendClientMessage(playerid, COLOR_GRAD3,":: CHAT :: (/o)oc /me /(ad)vertise (/cw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone");
SendClientMessage(playerid, COLOR_GRAD4,":: BANCA :: /balance /withdraw /deposit /wiretransfer /atm");
if(PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 14)
{
SendClientMessage(playerid, COLOR_YELLOW2, ":: Yamaguchi :: (/r)adio (/jap)aneese /steal");
}
if(PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember] == 15)
{
SendClientMessage(playerid, COLOR_YELLOW2, ":: Chornaya Bratva :: (/r)adio (/rus)sian");
}
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
{
SendClientMessage(playerid, COLOR_YELLOW2, ":: Surenos :: (/r)adio (/spa)nish /steal");
}
if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6)
{
SendClientMessage(playerid, COLOR_YELLOW2, ":: La Famiglia Sinatra :: /f");
}
if(PlayerInfo[playerid][pJob] == 1) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Detective:: /find"); }
else if(PlayerInfo[playerid][pJob] == 2) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Lawyer :: /free"); }
else if(PlayerInfo[playerid][pJob] == 3) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Whore :: /sex"); }
else if(PlayerInfo[playerid][pJob] == 4) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Drug Dealer :: /selldrugs /get drugs"); }
else if(PlayerInfo[playerid][pJob] == 5) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Car Jacker :: /dropcar"); }
else if(PlayerInfo[playerid][pJob] == 6) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Waiter :: /showmenu /cookuniform"); }
else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - News Reporter :: /paper /papers /live /news [text]"); }
else if(PlayerInfo[playerid][pJob] == 7) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Mechanic :: /repair /refill /duty /tow"); }
else if(PlayerInfo[playerid][pJob] == {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Bodyguard :: /guard"); }
else if(PlayerInfo[playerid][pJob] == 10) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Car Dealer :: /sellcar"); }
else if(PlayerInfo[playerid][pJob] == 11) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Stuntman :: /startstunt /stopstunt"); }
else if(PlayerInfo[playerid][pJob] == 12) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Boxer :: /fight /boxstats"); }
else if(PlayerInfo[playerid][pJob] == 13 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Taxi Driver :: /fare "); }
else if(PlayerInfo[playerid][pJob] == 14) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Bus Driver:: /fare"); }
else if(PlayerInfo[playerid][pJob] == 15) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Paper Boy :: /papers /bring /deliver"); }
else if(PlayerInfo[playerid][pJob] == 16) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Trucker :: /buyprods /sellprods /load"); }
else if(PlayerInfo[playerid][pJob] == 17) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Pizza Boy :: /duty /sellpizza"); }
else if(PlayerInfo[playerid][pJob] == 1 {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Farmer :: /startharvest /stopharvest"); }
else if(PlayerInfo[playerid][pJob] == 19) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Illegal Farmer :: /startdrugharvest /stopdrugharvest"); }
else if(PlayerInfo[playerid][pJob] == 20) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Drugs Smuggler :: /smuggledrugs /selldrugsto"); }
else if(PlayerInfo[playerid][pJob] == 21) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Street Sweeper :: /startsweep /stopsweep"); }
else if(PlayerInfo[playerid][pJob] == 22) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Materials Smuggler :: /smugglemats /sellmats"); }
else if(PlayerInfo[playerid][pJob] == 23) {
SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Arms Dealer:: /creategun /buymats"); }
else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == {
SendClientMessage(playerid,COLOR_YELLOW2,":: HITMAN :: /portable"); }
if(PlayerInfo[playerid][pMember] == 11||PlayerInfo[playerid][pLeader] == 11){
SendClientMessage(playerid,COLOR_YELLOW2,":: TIGANI :: /f"); }

if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GROVE, ":: ADMIN :: /admin /ahelp");
}
SendClientMessage(playerid, COLOR_GRAD6,":: OTHER :: /phonehelp /househelp /notehelp /vehiclehelp /renthelp /businesshelp /leaderhelp /fishhelp /cookhelp /irchelp /derbyhelp");
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /help",d,m,y,h,mi,s,sendername);
CommandLog(string);
return 1;
}

Reply
#9

read this https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#10

Quote:
Originally Posted by googamalugafoo
Посмотреть сообщение
change the ShowPlayerDialog in the code i pasted with this

pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Help",":: ACCOUNT :: /reguli /stats /account /changename\n :: GENERAL :: /pay /charity /time /buy /unrentcar /unRentveh /switchkey /id /drink /clothes /leaders /wo /knock /doorshout /resetspawn\n :: GENERAL :: /resetupgrades(50k) /buygun /lock /skill /licenses /showlicenses /atalk /anim /stopanim /use\n :: GENERAL :: /report /cancel /accept /eject /usedrugs /contract /fill /admins (/f)actionlist /gps /chatmode /fightstyle /(de)attachweapon\n :: GENERAL ::  /coin (/inv)entory /knock /knockout /give /gateopen /sid /smoke /(sur)render /cophelp /selectspawn\n :: CAR :: /trunk\n :: CHAT :: (/o)oc /me /(ad)vertise (/cw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone\n :: BANCA :: /balance /withdraw /deposit /wiretransfer /atm.","Close","");
Like this only this doesent work....im romanian..i need help understanding.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)