Jump to content

Event never reaching the serverside..?


.:HyPeX:.

Recommended Posts

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...