Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: self.name help

  1. #11
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    the most fascinating is your fantastic music choice i like it

  2. #12
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    https://www.youtube.com/watch?v=kztAvgm4CNE

    Edit: damn, never looked at the clip... fcking hipster :P

    Guess im a hipster now...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #13
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by kung foo man View Post
    Code:
    PLAYER COMMAND! message="mr, 32, 1, axis, "
    PLAYER COMMAND! message="mr, 32, 3, kar98k_mp, "
    PLAYER COMMAND! message="mr, 32, 0, callvote, "
    PLAYER COMMAND! message="callvote, tempBanUser, kung, "
    So using this I can grab which name the players select on the feeder list? What if two players use the same name? Can't do something like a custom ban menu because you risk banning the wrong person.

  4. #14
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You can just rename or kick people with the same name. E.g. a loop which is constantly checking for same names (using a []-hashmap and checking if the name/key isDefined() already). Maybe somebody knows such script and can post here. It should track the time of the names, so the new names get kicked and not the old.
    timescale 0.01

  5. #15
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Well i'v been working on a way to alert players why they were kicked when having a duplicate name.

    I'm trying to create a custom kick message using stock localized strings for language reasons.

    I'v managed to do this:
    Click image for larger version. 

Name:	shot0012.jpg 
Views:	36 
Size:	170.5 KB 
ID:	787
    Code:
    		itemDef 
    		{
    			name			line1
    			//text			"Server Disconnected - Player kicked."
    			text			"@EXE_SERVERDISCONNECTREASON"
    			//type			ITEM_TYPE_MULTI
    			textfont		UI_FONT_NORMAL
    			textscale		.25
    			style			UI_BUTTON_STYLE
    			textstyle		UI_BUTTON_TEXT_STYLE
    			rect			65 37 100 15
    			textalign		1
    			textalignx		51		// center
    			textaligny		11
    			decoration
    			backcolor		UI_BUTTON_BACK_COLOR
    			forecolor		UI_BUTTON_TEXT_COLOR
    			visible			1
    			dvar			"serv_kicked"
    			//dvarFloatList		{ "@EXE_PLAYERKICKED" 0 }
    		}
    As you can see - "&&1" is showing. I know how to set/use the "&&1" with iprintln/iprintlnbold but not menus.

    I'v tried using "dvarFloatList" but it produced:
    Click image for larger version. 

Name:	shot0011.jpg 
Views:	34 
Size:	172.0 KB 
ID:	788
    Code:
    		itemDef 
    		{
    			name			line1
    			//text			"Server Disconnected - Player kicked."
    			text			"@EXE_SERVERDISCONNECTREASON"
    			type			ITEM_TYPE_MULTI
    			textfont		UI_FONT_NORMAL
    			textscale		.25
    			style			UI_BUTTON_STYLE
    			textstyle		UI_BUTTON_TEXT_STYLE
    			rect			65 37 100 15
    			textalign		1
    			textalignx		51		// center
    			textaligny		11
    			decoration
    			backcolor		UI_BUTTON_BACK_COLOR
    			forecolor		UI_BUTTON_TEXT_COLOR
    			visible			1
    			dvar			"serv_kicked"
    			dvarFloatList		{ "@EXE_PLAYERKICKED" 0 }
    		}
    Text is no longer centered and "&&1" still shows.


    So with menus how can I use localized strings that have "&&1"?
    Attached Thumbnails Attached Thumbnails shot0009.jpg   shot0010.jpg  
    Last edited by filthy_freak_; 19th October 2014 at 16:58.

  6. #16
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    without loc strings:
    look into the extreme mod (_ex_security.gsc)
    PHP Code:
    player setClientCvar"com_errortitle" "Kicked!" );
    player setClientCvar"com_errormessage" "You've been kicked for bla" ); 
    Last edited by serthy; 19th October 2014 at 16:57.

  7. #17
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by serthy View Post
    without loc strings:
    look into the extreme mod (_ex_security.gsc)
    PHP Code:
    player setClientCvar"com_errortitle" "Kicked!" );
    player setClientCvar"com_errormessage" "You've been kicked for bla" ); 
    Yeah I know I can do it easily without loc strings but i'm trying to use loc strings so it is translated properly for those who use different languages. Is it not possible?

    Also updated previous post with more info

    EDIT: Should clarify - I know there are other ways to alert players why they were kicked but i'm hoping this method will work so I can use it for other things.
    Last edited by filthy_freak_; 19th October 2014 at 17:17.

  8. #18
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    You should try and use my translation engine for libcod to do that... Translations are stored serverside for easy updating, it supports 16 different languages and 1k items per language, all of which can be upped manually in the sourcecode of libcod.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  9. #19
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by IzNoGoD View Post
    You should try and use my translation engine for libcod to do that... Translations are stored serverside for easy updating, it supports 16 different languages and 1k items per language, all of which can be upped manually in the sourcecode of libcod.
    Hmm if there was a tut i'd give it a go

  10. #20
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by filthy_freak_ View Post
    Hmm if there was a tut i'd give it a go
    http://killtube.org/showthread.php?2...slation-engine
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •