.:HyPeX:. Posted April 25, 2015 Share Posted April 25, 2015 As the title says, server function is never called... Client: addEvent('onClientWantStats',true) addEvent('onPlayerRequestMapList',true) function askStats() if not cooldown then cooldown = true setTimer(function() cooldown = nil end, 10000,1) outputChatBox("Asked: C") triggerServerEvent("onPlayerRequestMapList",localPlayer) return triggerServerEvent('onClientWantStats',localPlayer) else return false end end Server: function onClientAskMapList() outputChatBox("Called",root) if client ~= source then outputChatBox("Client Faking!! Player: "..getPlayerName(client), root,255,255,255,true) return end local maplist = exports.mapmanager:getMapsCompatibleWithGamemode( getResourceFromName('race') ) outputChatBox(#maplist,root) triggerClientEvent(client,"onPlayerReturnMapList",client,maplist) end addEventHandler("onPlayerRequestMapList",root,onClientAskMapList) Link to comment
Castillo Posted April 25, 2015 Share Posted April 25, 2015 addEvent('onPlayerRequestMapList',true) -- This one should be in the server side Link to comment
.:HyPeX:. Posted April 25, 2015 Author Share Posted April 25, 2015 Solidsnake14 said: addEvent('onPlayerRequestMapList',true) -- This one should be in the server side It is there however, i added it just in case as a test... This is serverside, a little more up: --Events addEvent("onPlayerRaceWasted", true) addEvent("onClientWastedByHunter", true) addEvent("onPlayerPickUpRacePickup", true) addEvent("onPlayerRequestMapList",true) --Functions function onClientAskMapList() 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