PlayAkoya Posted June 21, 2015 Share Posted June 21, 2015 Hi, I would like to Client-side markers - > Save the server side? I need it for a client-side query whether the marker is already occupied or not? marker = createMarker(0, 0, 0, "corona", 2.0, 0, 0, 0, 0, getRootElement()) setElementData(marker, "BankState", false) function onHitBankautomat(player, dim) if (getElementData(source, "BankState") == false) setElementData(source, "BankState", true) else outputChatBox("The ATM is already taken!", 200, 0, 0) end end addEventHandler("onClientMarkerHit", marker, onHitBankautomat) Unfortunately, the script only works for the Local Clienseitgen markers and not for all client side marker by all players. I find this very hard and hope someone can help me! Link to comment
Gr0x Posted June 21, 2015 Share Posted June 21, 2015 Why don't you make it server side? Link to comment
PlayAkoya Posted June 21, 2015 Author Share Posted June 21, 2015 Because you only markers currently may make Clientseitg with attachElements! On the server side will not have always been there with problems! Objekt attachElement with Marker and Event from Server it does not work. Link to comment
Anubhav Posted June 22, 2015 Share Posted June 22, 2015 You may bother using triggerServerEvent with the marker variable as a argument? Do anything you want in the server with it. Link to comment
TAPL Posted June 22, 2015 Share Posted June 22, 2015 You may bother using triggerServerEvent with the marker variable as a argument? Do anything you want in the server with it. Server side doesn't recognize elements created client side. Link to comment
PlayAkoya Posted June 22, 2015 Author Share Posted June 22, 2015 Can someone help me with the problem someone else? https://bugs.multitheftauto.com/view.php?id=8892 Link to comment
Walid Posted June 22, 2015 Share Posted June 22, 2015 Can someone help me with the problem someone else?https://bugs.multitheftauto.com/view.php?id=8892 try this it should work bank = createObject(2942, 2489.6000976563, -1667.3000488281, 13) marker = createMarker(2489.6000976563, -1667.3000488281, 13, "corona", 2.0, 0, 0, 0, 0, getRootElement()) attachElements(marker, bank) function onHitBankautomat(player, dim) if dim and isElement(player) and getElementType(player) == "player" then outputChatBox("Function triggered!", player, 0, 200, 0) end end addEventHandler("onMarkerHit", marker, onHitBankautomat) 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