squaredb Posted November 14, 2012 Share Posted November 14, 2012 Hey fellas, I am looking to find the object ID for the bloodpools seen around CJ. Any ID lead will help. Ideas include the [ .dff file ID ]?, the [ object ID ]?, [ other ID ]?, any ID that will allow me to script createObject(bloodpool). Thanks for your time. Link to comment
Smart. Posted November 14, 2012 Share Posted November 14, 2012 Don't know the ID but you should be able to add blood using: fxAddBlood Link to comment
squaredb Posted November 14, 2012 Author Share Posted November 14, 2012 I can do that, however fxAddBlood is a client side only function. I want and probably need to program my bloodpools server side. Still searching. Link to comment
myonlake Posted November 14, 2012 Share Posted November 14, 2012 I can do that, however fxAddBlood is a client side only function. I want and probably need to program my bloodpools server side. Still searching. You can always use exported functions or triggers if anything. There is no "object ID" for blood pools since they are not objects. Link to comment
Renkon Posted November 14, 2012 Share Posted November 14, 2012 Try this: -- Server function fxAddForAllClientsBlood(x, y, z, dx, dy, dz, c, b) if type(x) ~= "number" or type(y) ~= "number" or type(z) ~= "number" or type(dx) ~= "number" or type(dy) ~= "number" or type(dz) ~= "number" then outputDebugString("Invalid arguments in fxAddForAllClientsBlood", 1) return end if not c then c = 1 end if not b then b = 1 end triggerClientEvent(root, "onServerRequest_fxAddBlood", root, x, y, z, dx, dy, dz, c, b) end -- Client addEvent("onServerRequest_fxAddBlood", true) addEventHandler("onServerRequest_fxAddBlood", root, function(x, y, z, dx, dy, dz, c, b) fxAddBlood(x, y, z, dx, dy, dz, c, b) end ) Link to comment
myonlake Posted November 15, 2012 Share Posted November 15, 2012 Try this:-- Server function fxAddForAllClientsBlood(x, y, z, dx, dy, dz, c, b) if type(x) ~= "number" or type(y) ~= "number" or type(z) ~= "number" or type(dx) ~= "number" or type(dy) ~= "number" or type(dz) ~= "number" then outputDebugString("Invalid arguments in fxAddForAllClientsBlood", 1) return end if not c then c = 1 end if not b then b = 1 end triggerClientEvent(root, "onServerRequest_fxAddBlood", root, x, y, z, dx, dy, dz, c, b) end -- Client addEvent("onServerRequest_fxAddBlood", true) addEventHandler("onServerRequest_fxAddBlood", root, function(x, y, z, dx, dy, dz, c, b) fxAddBlood(x, y, z, dx, dy, dz, c, b) end ) A very great example in how it should be done. Link to comment
squaredb Posted November 15, 2012 Author Share Posted November 15, 2012 sq - Renkon's script is beautiful like a woman I still don't understand... I'm still in trouble with the trigger. Thank you from a newbie. Link to comment
Renkon Posted November 15, 2012 Share Posted November 15, 2012 triggerClientEvent has got some undefined number of arguments. First argument is/are the element/s that will take part on the event. Since blood will be added for everybody we set ROOT. Then, second argument, ofc the event. Third argument is the SOURCE of the event. Since it's not important here we just set ROOT. After that, you can pass arguments (x, y, z, etc) F/E if you wanted to trigger a Client Event for only ONE person, you can use as first argument getPlayerFromName(), just as an example. With my code, if you want to create a blood that will be seen for everybody, do serverside: fxAddForAllClientsBlood(x, y, z, dx, dy, dz, c, b) 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