| Blockland Forums > Help |
| How does this work? |
| (1/2) > >> |
| Dark Star:
How does this work? Name - variable - $Pref::Server::Name Players - variable - $Server::Playercount Max Players - variable - $Pref::Server::MaxPlayers Passworded true/false - function function checkPass() { if($Pref::Server::Password $= "") { return false; } else { return true; } } [passworded y/n variable] = checkPass(); |
| Pacnet2012³:
--- Quote from: Dark Star on September 04, 2012, 04:06:14 PM ---How does this work? Name - variable - $Pref::Server::Name Players - variable - $Server::Playercount Max Players - variable - $Pref::Server::MaxPlayers Passworded true/false - function function checkPass() { if($Pref::Server::Password $= "") { return false; } else { return true; } } [passworded y/n variable] = checkPass(); --- End quote --- Well you don't seem to get my explanation. The server name is gotten with the variable "$Pref::Server::Name". The amount of players is gotten with the variable "$Server::Playercount". The MAXIMUM amount of players is the variable "$Pref::Server::MaxPlayers". (You put $Server::Playercount @ "/" @ $Pref::Server::Maxplayers to get something like 5/32). This is a FUNCTION that checks if the server is under a password : function checkPass() { if($Pref::Server::Password $= "") { return false; } else { return true; } } So if you wanted a variable named "%pwd", for example, to state if the server is passworded or not, you would do this : %pwd = checkPass(); Is that clear? |
| Dark Star:
So i do Name - variable - $Pref::Server::Name=Blah; Players - variable - $Server::Playercount @ '/' @; Max Players - variable - $Pref::Server::MaxPlayers=50; Passworded true/false - function function checkPass() { if($Pref::Server::Password $= "Blah") { return false; } else { return true; } } [passworded y/n variable] = checkPass(); |
| Dark Star:
I give up and come join my server you already have admin |
| Pacnet2012³:
No. Do you know how to script? If you don't, you shouldn't try yet. |
| Navigation |
| Message Index |
| Next page |