Jump to content

TriggerServerEvent


xeon17

Recommended Posts

Posted (edited)

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

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted

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

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

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

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted

No use

triggerServerEvent('onAccepted', root) 
  

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

Posted
No use
triggerServerEvent('onAccepted', root) 
  

Why ? what it will change? i want to learn more about this function :)

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted

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

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

Posted
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

That''s all , thanks for your help :)

Regards!

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted

Nope u are welcome at any time

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

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

Posted

Thats what i said for me root better anyway we should increase the cpu for great performance

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

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