Show Posts
|
Pages: 1 [2] 3 4 ... 37
|
16
|
Scripting / Script Releases / Re: GetSkinName
|
on: July 31, 2014, 11:03:12 pm
|
There's a third way ... Make an array of all the skins and just use something like:
return SkinNames[ skinid ] Uses more memory since it needs to load the whole array in order to return one index. The switch method is better in this case.
|
|
|
17
|
Scripting / Script Releases / Re: GetSkinName
|
on: July 22, 2014, 06:03:47 pm
|
Version 1 is the better. It would be nice to add a default value like "Unknown" to be sure it actually returns something even if you enter a invalid id.
|
|
|
19
|
Liberty Unleashed / Suggestions / Re: List of suggestions & bugs
|
on: July 16, 2014, 08:34:04 pm
|
· * Event: onServerCrash
Lol, and how do you expect this to work? It's like requesting a dead person to tell his family he's dead. He can't, he's dead. Same goes with the server. It dies. You'd be happy if it was able to free up some memory before dying.
|
|
|
25
|
Scripting / Script Help / Re: Correct Command Check
|
on: June 27, 2014, 12:57:40 pm
|
Why on earth would you do it like that?
Just use a switch or lot's of if's, and add an default or else.
function onPlayerCommand( pPlayer, szCommand, szText ) { cmd = szCommand.tolower(); if ( cmd == 'info' ) { //Some code } else if ( cmd == 'wanted' ) { //Some code } else { MessagePlayer( 'Invalid command', pPlayer ); }
function onPlayerCommand( pPlayer, szCommand, szText ) { cmd = szCommand.tolower(); switch ( cmd ) { case 'info': //Some code break; case 'wanted': //Some code break; default: MessagePlayer( 'Invalid command', pPlayer ); break; } }
|
|
|
26
|
Liberty Unleashed / Liberty Unleashed Chat / Re: Vrocker-Hosting.co.uk
|
on: June 26, 2014, 12:04:10 pm
|
Same page shows if your server is on the masterlist or not.
Most routers don't like connections from inside to their outside IP, this is why you probably can't see your server on the list. If my page says it's on it, other people can see it.
|
|
|
30
|
Scripting / Script Help / Re: rpg script
|
on: June 17, 2014, 02:00:41 pm
|
You script it.
Jokes aside, RPG scripts are hard and shouldn't be tried before you are skilled enough to make scripts from scratch and make commands and functions yourself.
Take a look in the released scripts board and make yourself familiar with the syntax.
|
|
|
|