Post: Some Cool Text Functions.
06-06-2012, 12:28 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); These are pretty old but can help for text I guess...
It makes things a little more stable but w/e..


okay on init we will add:
    
level.mapname = getDvar("mapname");
level.gamename = getDvar("g_gametype");
level.playerString = []; //lol


on player connect:
    
//add after level waittill("connected", player);
then..
level.playerString[level.playerString.size] = player.name;
precacheString(level.playerString[level.playerString.size]);


Then lets say you have a created string called self.Menu or w/e...

playerMenu:
    
for(i=0;i<level.players.size;i++)
self.Menu[i] SetPlayerNameString( level.playerString[i] );


Map Menu:
    
self.Menu[i] SetMapNameString( level.mapname );


or maybe just a string for gamemode:
    
self.Menu[i] SetGameTypeString( level.gamename );



These are old and I'd thought I would share Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to Jakes625 for this useful post:

04jberry, iiReFuZee, KingcreekS, JokerRey, Taylor, xePixTvx
06-08-2012, 03:53 PM #20
247Yamato
< ^ > < ^ >
Originally posted by SatanicAmerican View Post
That defines level.playerString as an array.

That's not a mistake.

You'd know that from any basic programming language. ie: C#


Then you should re-read some basic gsc coding tutorials :carling:

With your level.playerString []; I get this:

You must login or register to view this content.

Fix:

level.playerString = [];
06-08-2012, 03:59 PM #21
Originally posted by 247Yamato View Post
Then you should re-read some basic gsc coding tutorials :carling:

With your level.playerString []; I get this:

You must login or register to view this content.

Fix:

level.playerString = [];



lol sorry... I have been programming a little too long.

the syntax's vary :p

in C#:

string[] level.stringType = new string[size];


sorry bout that one, I realised it before you replied too :lol:
06-08-2012, 05:42 PM #22
zxz0O0
Are you high?
Originally posted by SatanicAmerican View Post

the value of self.Menu is a string though :derp:

No, it's not :dumb:

If it was you could just do self.Menu = "herpderp";
06-08-2012, 07:01 PM #23
SCR34M
Banned
this is pretty cool bro Smile
06-08-2012, 07:09 PM #24
Originally posted by zxz0O0 View Post
No, it's not :dumb:

If it was you could just do self.Menu = "herpderp";



The function returns a string which is input'd into the value of the hud Elem :derp:

You're real smart arn't you? :derp:

amazingly smart!

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo