pino-boy Posted July 2, 2013 Share Posted July 2, 2013 hello I have a problem in this part is not working no enable race gamemode Help-Me setElementData (localPlayer,"gamemode","[gamemodes]/[race]/race", true) Link to comment
Castillo Posted July 2, 2013 Share Posted July 2, 2013 What is that? it doesn't make any sense. Link to comment
iPrestege Posted July 2, 2013 Share Posted July 2, 2013 You have to create or re-make the race gamemode and the mapManager resource. Link to comment
pino-boy Posted July 2, 2013 Author Share Posted July 2, 2013 this line is no working I tried many things and nothing What is missing ???? setElementData (localPlayer,"gamemode","[gamemodes]/[race]/race", true) function Click( ) setElementDimension ( localPlayer, 2 ) outputChatBox ( tostring ( getElementDimension ( localPlayer ) ) ) setElementData (localPlayer,"gamemode","[gamemodes]/[race]/race", true) guiSetVisible(myWindow, false) showCursor(false) guiSetInputEnabled(false) end Link to comment
AMARANT Posted July 2, 2013 Share Posted July 2, 2013 this line is no working I tried many things and nothing What is missing ???? Read closely function arguments on Wikia! setElementData Link to comment
pino-boy Posted July 2, 2013 Author Share Posted July 2, 2013 You have to create or re-make the race gamemode and the mapManager resource. you mean, I have to create a game mode all (create a race gamemode?) Link to comment
AMARANT Posted July 2, 2013 Share Posted July 2, 2013 I mean that in the line you're talking about, wrong arguments have been passed to the function! Link to comment
pino-boy Posted July 2, 2013 Author Share Posted July 2, 2013 I took a look in wiki https://wiki.multitheftauto.com/wiki/SetElementData function Racestart (source) setElementData (source,"gamemode","[gamemodes]/[race]/race", true) end addEvent("start", true) addEventHandler( "start", getRootElement(), Racestart ) Link to comment
AMARANT Posted July 2, 2013 Share Posted July 2, 2013 I got what you want. Forget about element data. First, where did you get your code? What a resource is that? Link to comment
pino-boy Posted July 3, 2013 Author Share Posted July 3, 2013 I am trying to activate the race gamemode in dimension (2), but not activating this gamemode race was in clienteSide tried to put ServerSide and gave this error I've got two weeks trying to find out why this problem Link to comment
AMARANT Posted July 3, 2013 Share Posted July 3, 2013 Unfortunately I can't help you here. I've never dealt with the race resource if you mean the standard one. But I can assure you that changing some lines of code at random is not gonna help you either. Link to comment
pino-boy Posted July 3, 2013 Author Share Posted July 3, 2013 Unfortunately I can't help you here. I've never dealt with the race resource if you mean the standard one. But I can assure you that changing some lines of code at random is not gonna help you either. then you can not help me here ! Private message ? Link to comment
AMARANT Posted July 3, 2013 Share Posted July 3, 2013 I meant I can't help you with race resource. I don't know it. Sorry. Link to comment
pino-boy Posted July 3, 2013 Author Share Posted July 3, 2013 but not a feature race can also be play, cmd, deathmatch, etc. ... and that the problem is not activating the gamemode type setElementData (source ,"gamemode","[gamemodes]/[play]/play", true) setElementData (source ,"gamemode","[gamemodes]/[deathmatch]/deathmatch", true) I just wanted to know why not activate the gamemode if not can respond here send me a private message (Please) Link to comment
PaiN^ Posted July 3, 2013 Share Posted July 3, 2013 If you want to make a multigamemode server, You'll need more that element data .. Link to comment
pino-boy Posted July 3, 2013 Author Share Posted July 3, 2013 If you want to make a multigamemode server, You'll need more that element data .. I know that it takes more lines, but the problem this this line, tried to correct, i could not, and I came here to ask for help setElementData (source,"gamemode","[gamemodes]/[race]/race", true) Link to comment
JuniorMelo Posted July 3, 2013 Share Posted July 3, 2013 thus try ! function Racestart (player) setElementData (player,"gamemode","[gamemodes]/[race]/race", true) end addEvent("start", true) addEventHandler( "start", getRootElement(), Racestart ) Link to comment
pino-boy Posted July 3, 2013 Author Share Posted July 3, 2013 thus try ! function Racestart (player) setElementData (player,"gamemode","[gamemodes]/[race]/race", true) end addEvent("start", true) addEventHandler( "start", getRootElement(), Racestart ) No Work the problem and I am trying to activate the game mode in another dimension but will not Link to comment
pino-boy Posted July 3, 2013 Author Share Posted July 3, 2013 Help Please please please Link to comment
JuniorMelo Posted July 5, 2013 Share Posted July 5, 2013 then sorry I am not very good with this kind of script Link to comment
PaiN^ Posted July 5, 2013 Share Posted July 5, 2013 Can you show me the function where this line is . Link to comment
pino-boy Posted July 5, 2013 Author Share Posted July 5, 2013 Client function Click( ) setElementDimension ( localPlayer, 2 ) outputChatBox ( tostring ( getElementDimension ( localPlayer ) ) ) triggerServerEvent("racestart",localPlayer ) guiSetVisible(myWindow, false) showCursor(false) guiSetInputEnabled(false) end -------------------------------------------------- Server function Racestart (hitElement) if ( isElement ( hitElement ) and getElementType ( hitElement ) == "player" ) then setElementData (hitElement,"gamemode","[gamemodes]/[race]/race", true) end end addEvent("racestart", true) addEventHandler( "racestart", getRootElement(), Racestart ) Link to comment
PaiN^ Posted July 5, 2013 Share Posted July 5, 2013 function Click( ) setElementDimension( localPlayer, 2 ) outputChatBox( tostring ( getElementDimension ( localPlayer ) ) ) triggerServerEvent( "racestart", localPlayer, localPlayer ) guiSetVisible( myWindow, false ) showCursor( false ) guiSetInputEnabled( false ) end Link to comment
pino-boy Posted July 5, 2013 Author Share Posted July 5, 2013 function Click( ) setElementDimension( localPlayer, 2 ) outputChatBox( tostring ( getElementDimension ( localPlayer ) ) ) triggerServerEvent( "racestart", localPlayer, localPlayer ) guiSetVisible( myWindow, false ) showCursor( false ) guiSetInputEnabled( false ) end no working Link to comment
PaiN^ Posted July 5, 2013 Share Posted July 5, 2013 Post the event handler of the function "Click" . 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