Sauerworld Forum

GUI menu Sorry-NP

alebrije

  • *
  • 21
  • +4/-0
    • JuGadores Latinos eXtremos
GUI menu Sorry-NP
« on: January 07, 2016, 11:14:15 PM »

Yeah, another script, gui, wathever, to say sorry and no problem but, this one is not automatic.  ;D
You have the option to say it or not, and custimize the message.

The gui, by default is binded to the F6 key (feel  free to change it).


Code: [Select]
bind "F6" "showgui sorry_np"

newgui sorry_np [
   guitext "Teammates:"
   guibar
   looplist cn (listclients 0) [
      guilist [
         if (&& (> (strcmp (getteam) (getclientteam $cn)) 0) (= (isspectator $cn) 0) ) [
            guitext (concatword "^f4[^f5" (? (< $cn 10) " ") $cn "^f4]^f7 " (getclientname $cn) ": ") (getclienticon $cn)
            guibutton "^f6>^f4sorry " [ sorry (getclientname @@cn) ] 0
            guibutton "^f1>^f4np" [ np (getclientname @@cn) ] 0
         ][]
      ]
   ]
   guitab "custom_msg"
      guitext "^fsUse ^f6'xx' ^frinsted to put the name"
      guitext "of the player; it means: ^fs^f1nombre^fr=^f6xx^f7"
      guibar
      guitext "^f3sorry ^f1message"
      guifield m_sorry 30 [] 
      guibar
      guitext "^f2np ^f1message"
      guifield m_np 30 []
]

sorry = [ result (sayteam (strreplace $m_sorry "xx" $arg1)) ]
np = [ result (sayteam (strreplace $m_np "xx" $arg1)) ]

The file is attachment (as a txt file, can't upload cfg files  >:( don't forgget change extention) and here some screenshots:



The first thing that you have to do is set both messages in this tab (custom_msg).



Just copy the cfg file to your config folder (where is your autoconf.cfg ) and add the line exec gui_sorry_np.cfg at the end of your autoexec.cfg
Verba volant, scripta manent