TheMtaUser555 Posted September 7, 2011 Share Posted September 7, 2011 -- client-side [code]addEvent("enableHover",true) addEventHandler("enableHover",root, function (enable) setWorldSpecialPropertyEnabled("hovercars",enable) for k,thePlayer in ipairs(getElementsByType('player')) do setElementData( thePlayer, "overrideCollide.uniqueblah", 255, false ) --i tried 'true', didn't work, i tried to set 255 to 0, still nothing and tried nil, nothing. outputChatBox ( "GhostMode Disabled!", getRootElement(), 255, 0, 0, true ) end end ) addEvent('onClientMapStarting', true) function GhostMode() for k,thePlayer in ipairs(getElementsByType('player')) do setElementData( thePlayer, "overrideCollide.uniqueblah", 0, true) end end addEventHandler('onClientMapStarting', getRootElement(), GhostMode) [/code] -- server-side [code]addEvent("onPlayerReachCheckpoint") addEventHandler("onPlayerReachCheckpoint",root, function (cp) if cp == 5 then triggerClientEvent(source,"enableHover",root,true) end end )[/code] The only thing that doesn't work is when I reach the 5th checkpoint, the ghostmode it's still on..and Id'like to disable it when the player reaches there, please help and thanks. Link to comment
BinSlayer1 Posted September 7, 2011 Share Posted September 7, 2011 why don't you do this serverside? It seems odd changing remote players' ghostmode Link to comment
TheMtaUser555 Posted September 7, 2011 Author Share Posted September 7, 2011 why don't you do this serverside? It seems odd changing remote players' ghostmode I want the person that reaches the 5th cp to have his ghostmode disabled, not everyone..I'll will try serverside then but I don't think it's gonna work the way I want to tho Link to comment
BinSlayer1 Posted September 7, 2011 Share Posted September 7, 2011 setElementData( source, "overrideCollide.uniqueblah", nil, false ) so use this line instead of triggering a client event @ cp5 also put ghostmode on serverside onMapStarting Link to comment
IIIIlllllIII Posted September 7, 2011 Share Posted September 7, 2011 maybe ur problem in client use this client http://www.mediafire.com/?324ymf7a28cfedz sorry the code of this client crypted i cant see the code and trye to add onRequestGhostMode or function onRecieveGhostModeFromServer something like that but im not sure Link to comment
TAPL Posted September 7, 2011 Share Posted September 7, 2011 maybe ur problem in clientuse this client http://www.mediafire.com/?324ymf7a28cfedz sorry the code of this client crypted i cant see the code and trye to add onRequestGhostMode or function onRecieveGhostModeFromServer something like that but im not sure waaaaaaaa omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg omg Please say this not my Script Client-side Please lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol lol edit: Seriously what do you think this client do? Link to comment
TheMtaUser555 Posted September 7, 2011 Author Share Posted September 7, 2011 setElementData( source, "overrideCollide.uniqueblah", nil, false ) so use this line instead of triggering a client event @ cp5 also put ghostmode on serverside onMapStarting thanks for the help, it's working now.(serverside) 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