LucasBaker Posted May 20, 2013 Share Posted May 20, 2013 Well I'm trying to create a script to do when the player enters the server to set stats 1000 saw and uzi plus has something wrong could someone help me? function jstats (thePlayer) setPlayerStat ( thePlayer, 75, 1000 ) setPlayerStat ( thePlayer, 73, 1000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), jstats ) Link to comment
iPrestege Posted May 20, 2013 Share Posted May 20, 2013 Remove the 'thePlayer' element from the function and change the setPlayerStat function element at argument ( 1 ) to source . Link to comment
LucasBaker Posted May 20, 2013 Author Share Posted May 20, 2013 Remove the 'thePlayer' element from the function and change the setPlayerStat function element at argument ( 1 ) to source . well? function jstats (source) setPlayerStat ( source, 75, 1000 ) setPlayerStat ( source, 73, 1000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), jstats ) Link to comment
iPrestege Posted May 20, 2013 Share Posted May 20, 2013 function jstats ( ) setPlayerStat ( source, 75, 1000 ) setPlayerStat ( source, 73, 1000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), jstats ) There's no need to defined source because it's already defined . 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