Jump to content

Father0625

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Father0625

  1. it is working now, thanks for helpful!
  2. Still not working, event isnt triggered.
  3. Hello guys its me again, i have some bull:~ problem. I cant trigger a client event, and i dont know why, because normally i can.. Sorry for my bad english, im not the best. So the problem. Im making an event system to my server on my own way, like "TDM" or "Race" events. In the test now, i can start it with /testrace comamnd, then something happens to all players on the server, because i only do test it with my best friend, so we 2 guys on the server and no more. Everything good, only the Client side event isnt triggered. But what is wrong? Because no errors in the server's command line. I want to do, when i use a command, a client side event do runs for all online player. What do i do wrong? Script_serverside: local racer_players = { } function testrace(player, command) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) triggerClientEvent("raceCevent", thePlayer) -- Only this isnt running! outputChatBox("for thePlayer", thePlayer, 255, 0, 0) table.insert( racer_players, theKey, thePlayer) end outputChatBox("Server script is working further..", player, 255, 0, 0) triggerEvent("race_start", root) end addCommandHandler('race', testrace) addEvent( "race_start", true ) addEventHandler( "race_start", root, function() outputChatBox("race_start event is triggered", player, 255, 0, 0) for theKey,thePlayer in ipairs(racer_players) do --I do some script here, doesnt matters end end) Script_clientside addEvent("raceCevent", true) addEventHandler("raceCevent", localPlayer, function() outputChatBox("raceCevent is triggered!", 0, 255, 0) end) On the server: https://prnt.sc/7Fb8rWxxSjbo No errors in the command line. What is bad? Thanks for help guys! - Father
  4. Hello guys.. Uuhm yeah, so my english is not the best, but i hope u will understand what i want to.. So im making a register / login script to my server. I want to do, when a player pressed in the user, password and emal, click to 'Register' button, a Server Event start and check the sql the username is free nad other things, then register the player etc u know.. The problem is, my server says "The event is not added to server side". https://prnt.sc/meNm5mQqnBSd What is the problem? Thanks for your help! Client side: function regClick() local checkC = isMouseWithinRangeOf(screenWidth/2 - 145, screenWidth/15, 780, 40) -- start x, width, start y, height if checkC then triggerServerEvent("player_regin", root, user, pass, mail) end end Server side (the event): addEvent("player_regin", true) addEventHandler("player_regin", root, function(user, pass, mail) outputChatBox ( user" "..pass.." "..mail, player, 255, 0, 0,) end) meta.xml: <meta> <script src = "Join/Checkplayer.lua" type = "server"/> <script src = "Join/Connect.lua" type = "server"/> <script src = "Join/Register.lua" type = "client"/> <script src = "Join/Login.lua" type = "client"/> <file src="Join/images/snev.png" /> <file src="Join/images/icon_fhnev.png" /> <file src="Join/images/icon_jelszo.png" /> <file src="Join/images/icon_email.png" /> </meta> I found it sorry, can delet or something Im idiot.
×
×
  • Create New...