TorNix~|nR Posted November 30, 2015 Share Posted November 30, 2015 Hello all please help me:( this work for me function giveWeaponsOnSpawn ( theSpawnpont, theTeam ) giveWeapon ( source, 31, 200 ) -- Gives the M4 weapon with 200 ammo end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) -- attach the event handler and this won't work, I need it function giveWeaponsOnSpawn ( theSpawnpont, theTeam ) giveWeapon ( source, 31, 200 ) -- Gives the M4 weapon with 200 ammo end addEventHandler ( "onPlayerJoin", getRootElement(), giveWeaponsOnSpawn ) -- attach the event handler please who can help Link to comment
1LoL1 Posted November 30, 2015 Share Posted November 30, 2015 Hello all please help me:( this work for me function giveWeaponsOnSpawn ( theSpawnpont, theTeam ) giveWeapon ( source, 31, 200 ) -- Gives the M4 weapon with 200 ammo end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) -- attach the event handler and this won't work, I need it function giveWeaponsOnSpawn ( theSpawnpont, theTeam ) giveWeapon ( source, 31, 200 ) -- Gives the M4 weapon with 200 ammo end addEventHandler ( "onPlayerJoin", getRootElement(), giveWeaponsOnSpawn ) -- attach the event handler please who can help function giveWeaponsOnSpawn () giveWeapon(source,31,200) end addEventHandler("onPlayerJoin", getRootElement(), giveWeaponsOnSpawn) Link to comment
TorNix~|nR Posted November 30, 2015 Author Share Posted November 30, 2015 Thank you LoL, I'll try it tomorrow, because I close pc, thank you Link to comment
TorNix~|nR Posted December 1, 2015 Author Share Posted December 1, 2015 It won't work too what I do ? Link to comment
Aristates Posted December 1, 2015 Share Posted December 1, 2015 theTeam , theSpawnPont is not defined. addEventHandler("onPlayerLogin", root, function(player) giveWeapon(player, 31,200) end ) addEventHandler("onPlayerSpawn", root, function(player) giveWeapon(player, 31,200) end ) Link to comment
1LoL1 Posted December 1, 2015 Share Posted December 1, 2015 It won't work too what I do ? My code work normally. I tested and worked. It's server-side. Link to comment
Anubhav Posted December 1, 2015 Share Posted December 1, 2015 onPlayerJoin won't work. It is when you connect and join it and download starts. You need to use onPlayerSpawn in this case too. 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