Goeth 0 Posted February 26, 2003 Like the topic says does anyone here know how to exec a sqs only in dedi server? Let´s put a simple thingie here. I have something like this and it doesn´t work. init.sqs </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">requiredVersion "1.85" titleCut ["", "BLACK IN", 3] [] exec "test.sqs" <span id='postcolor'> test.sqs </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">? !(local Server) : exit ? random 100 > 50 : goto "s1" ? random 100 > 25 : goto "s2" ? random 100 > 75 : goto "s3" goto "s4" #s1 "testmarker" SetMarkerPos getpos newlocation exit #s2 "testmarker" SetMarkerPos getpos newlocation exit #s3 "testmarker" SetMarkerPos getpos newlocation exit #s4 "testmarker" SetMarkerPos getpos newlocation exit <span id='postcolor'> This works but it´s executed by dedi and the client and there is conflicts. Share this post Link to post Share on other sites
bn880 5 Posted February 26, 2003 Did you create a gamelogic named Server? Share this post Link to post Share on other sites
Goeth 0 Posted February 27, 2003 Is there a way to add client related stuff in the server sqs? Stuff below works fine but there is problem with the testmarker, the position doesn´t udate on the client machine. init.sqs </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">requiredVersion "1.85" titleCut ["", "BLACK IN", 3] [] exec "test.sqs" <span id='postcolor'> test.sqs </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">? !(local Server) : exit ? random 100 > 50 : goto "s1" ? random 100 > 25 : goto "s2" ? random 100 > 75 : goto "s3" goto "s4" #s1 newlocation setpos getpos preloc tank setpos getpos newlocation "testmarker" SetMarkerPos getpos newlocation exit #s2 newlocation setpos getpos preloc tank setpos getpos newlocation "testmarker" SetMarkerPos getpos newlocation exit #s3 newlocation setpos getpos preloc tank setpos getpos newlocation "testmarker" SetMarkerPos getpos newlocation exit #s4 newlocation setpos getpos preloc tank setpos getpos newlocation "testmarker" SetMarkerPos getpos newlocation exit <span id='postcolor'> Share this post Link to post Share on other sites
Guest BratZ Posted February 27, 2003 maybe add a publicvariable "testmarker" #s1 newlocation setpos getpos preloc tank setpos getpos newlocation "testmarker" SetMarkerPos getpos newlocation publicvariable "testmarker" exit Share this post Link to post Share on other sites
Goeth 0 Posted February 27, 2003 Nope that didn´t solve the problem, any other ideas? Share this post Link to post Share on other sites
Doolittle 0 Posted February 27, 2003 Don't forget setMarkerPos must be run by all clients. (This I am 100% sure of.) Doolittle Share this post Link to post Share on other sites
whisperFFW06 0 Posted February 28, 2003 I don't get your problem, Goeth... As stated by bn880, the ?!(local server):exit part only works if you put a gamelogic named server somewhere on the map. With this, "local server" will be true only on server. Same method for client, the difference being that you don't need to add anything, there is a variable called "player" which is always created. I don't think "local player" would work, but, thanks to Kegetys here, a solution to check client side is : ?(name player != "Error: No Vehicle") The problem is that setMarkerPos AS to be done on each PC, so you should make the random variable assignation on server only, then publicVariable it, and set the marker afterwards : </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">randMarkLocIndex=101 ? !(local Server) : goto "notServerOnly" randMarkLocIndex=random 100 publicVariable "randMarkLocIndex" #notServerOnly @(randMarkLocIndex != 101) ? randMarkLocIndex > 75 : goto "s1" ? randMarkLocIndex > 50 : goto "s2" ? randMarkLocIndex > 25 : goto "s3" goto "s4" #s1 "testmarker" SetMarkerPos getpos newlocation1 exit #s2 "testmarker" SetMarkerPos getpos newlocation2 exit #s3 "testmarker" SetMarkerPos getpos newlocation3 exit #s4 "testmarker" SetMarkerPos getpos newlocation4 exit <span id='postcolor'> Whis' Share this post Link to post Share on other sites
~Too Tall~ 0 Posted March 1, 2003 only other problem is linux server. they dont like, pretty much everything. so even if u do figure it out, you will have one hell of a time getting it to work on linux next linux needs to go to hell in my opinon Share this post Link to post Share on other sites