ok for the Pop up menu as soon as the game starts. you don't even need to have the Host /non Host menu to pop up for client and servers to give you options to control the server from within the game
uhhhhhhh... its a basic script. made by i believe rec0 and kornman00...
it checks the vehicle health comparing it with the number 0. as mp vehicles don't have health as such it will either return 0 or nil/neg1
-1 means the vehicle dosn't exist. <0 means it exists
if you do something like this. and forgive me my scripting is a little rusty after 2 years
(global Boolean Isserver false) ;sets the global variable to false from the starting up of the server
then
(script startup isserver
(if unitgethealth(warthog1)==0
(set(Isserver, True)) :then part of the statement
(set(Isserver, False))
) :else part of the statement. more on those later
)
then you just use the global variavle in a continuous script for all your controls providing that the Isserver global is true
(script continuous serverstuff
(if Isserver
(server-iey things go here)
)
)
well its something like that anyway. when i get back into it ill be alittle less rusty with it all XD.. so that just means you don't need to have 1 extra menu to tell the client that you are either a client or server
oh!!! before i forget
the reason you use a vehicle to return the health is because.
vehicles only really exist on the servers. not on the clients
if you do something like
unitgethealth on a vehicle with the same name as something in sapien. on a server. it will return a number = to or greater than 0. depending on weather the vehicle has health or not.
if you run that on a client it will return -1 because it dosn't exist on the client.





We have also cleared up a LOT of the framerate issues on low end computers. 


Bookmarks