hulpje Posted April 16, 2017 Share Posted April 16, 2017 Hi, i'm creating a race map and just want to create a little trolling script where people teleport somewhere else when they write "delete map" in the chat. The problem: I usually work in the map editor / local server and if I write "delete map" I get a debugmessage ("what the :O"). If I write "delete map" in a hosted server of a friend it does work and teleport me. My questions: why the script works different and can I make it work in the map editor somehow? function memestars(text, element) if string.match(text, "delete map") then if isElement(element) and getElementType(element) == 'player' then bigbitch = getPedOccupiedVehicle(element) setElementPosition(bigbitch, 5202, 256, 87) else iprint("wat the :O: ", text, element) end end end addEventHandler("onChatMessage", root, memestars) Link to comment
Rataj Posted April 16, 2017 Share Posted April 16, 2017 Are you sure you're using totaly same script on both servers and writing it normally in chat as player? This should work just fine on both local and hosted servers. Maybe try to output element type in debugscript and reply what it is, if it's "not" a player. 1 Link to comment
hulpje Posted April 16, 2017 Author Share Posted April 16, 2017 Fixed the problem by /stop freeroam in the map editor. Thank you anyway. 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