Thread: Reset GUI
View Single Post
  #3  
Old 08-18-2008, 03:02 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Switch View Post
PHP Code:
      triggerserver("gui",name,"reset1",player.account);
    else
      
triggerserver("gui",name,"reset2",player.account,Reset_Reason.text); 
That's pretty insecure, could use a memory editor to edit the trigger and basically reset anyone you want. The data of who needs to be reset should be determined serverside, which is just basically changing params[1] to player.account serverside. Other than that, neat.
If it were me I would have probably done something like this:
PHP Code:
function onCreated() {
  
this.list = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  for (
temp.0temp.5temp.++) {
    
this.randomstr @= this.list.charat(int(random(0this.list.length())));
  }

for my way of determining the random string.

Edit:
You could also change the 5 to any number in the for loop and output a random string of alphanumeric characters as large as you specified.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”

Last edited by Tigairius; 08-18-2008 at 03:16 AM..
Reply With Quote