View Single Post
  #20  
Old 05-25-2010, 08:43 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
PHP Code:
function onActionServerSide(cmdv1v2) {
  if (
cmd == "calc_math") {
    
doMakeMathVar_S();
  }
}

doMakeMathVar_S(){
    
clientr.num params[1] + params[2];

seems to work the same as

PHP Code:
function onActionServerSide(cmdv1v2) {
  if (
cmd == "calc_math") {
        
clientr.num params[1] + params[2];
  }

I'm guessing because the v1 and v2 params or w/e were accessable through the entire serverside section of the script. making the doMakeMathVar_S function right there seem a bit redundant unless i can get the things to send values across eachother.

As for the timeout, when i was incorporating this into one of my other scripts and it didnt work, i played around with the example for a while to try getting it to work. i've found that looping something in player.chats is often very useful for finding where problems in scripts might be occuring. i suppose i couldve just put it in it's own timeout but since it's just an example, i looped that entire part. otherwise, if youre commenting on it being set to 1 as being random, like i said. it's an example so i just put whatever in that works.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote