Jump to content

TriggerServerEvent


xeon17

Recommended Posts

Hello there ,

I have problem with TriggerServerEvent , when i click on the Accept GUI it show me these errors , i'm still learning this function so can someone tell me what i'm doing and to fix it please.

Errors:

[2014-09-12 18:20:45] WARNING: (GW)LEI\BOPE.lua:29: Bad argument @ 'getPlayerTeam' [Expected player at argument 1, got nil] 
[2014-09-12 18:20:45] WARNING: (GW)LEI\BOPE.lua:30: Bad argument @ 'setPlayerTeam' [Expected player at argument 1, got nil] 
[2014-09-12 18:20:45] WARNING: (GW)LEI\BOPE.lua:31: Bad argument @ 'setElementModel' [Expected element at argument 1, got nil] 
  

Client:

 Script removed cuz so much stealers .  

Server:

----------------------------------------------------- 
-- script  Base & MAP LEI (Server)  
-- @author XeoN - Banex 
-- @update 30.08.2014 
----------------------------------------------------- 
  
  

Edited by Guest
Link to comment
Dont use player in the function that u trigger server sided use client or source and change the function arguments

function() and not function(player)

and replace player inside the function to client or source

Thank you man solved :) is everything correct with this part? because i can't test with more players.

        triggerServerEvent ( "onAccepted", resourceRoot ) 

Link to comment
Sure root and resourceRoot are just smilair u can use then both but use root more better resourceRoot is giving the resource root element but root give all resource root element any more questions

You are wrong here. root uses more cpu usage bzcaause it's sending message to all elements and resourceRoot will send message to elements within resource. resourceRoot is better.

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