'LinKin Posted February 16, 2014 Share Posted February 16, 2014 Hello, Does the number returned by getTickCount differs between server and client? I mean, for example: I have this client side addEvent("onClientStartRecordDistance", true) addEventHandler("onClientStartRecordDistance", root, function() myX, myY, myZ = getElementPosition(getPedOccupiedVehicle(localPlayer)) local startTime = getTickCount() setElementData(localPlayer, "startTime", startTime) addEventHandler("onClientRender", root , recordDistance) end) addEvent("onClientStopRecordDistance", true) addEventHandler("onClientStopRecordDistance", root, function() local endTime = getTickCount() setElementData(localPlayer, "endTime", endTime) removeEventHandler("onClientRender", root , recordDistance) end) and serverside addEventHandler("onPlayerQuit", root, function() triggerClientEvent(source, "onClientStopRecordDistance", source) end) But, the event is not triggered, I guess it is because the Client file stops existing when he quits. So I want to know if I can set these variables startTime and endTime serverside. Would the number returned by getTickCount() be the same server and client side? Link to comment
Castillo Posted February 16, 2014 Share Posted February 16, 2014 No, they are different. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now