• Need help
    0 replies, posted
What i'm trying to do is once you spawn in on my ttt server you spawn with a random weapon i'm also going to add customweapons but i need this to work 1st [CODE]local function OnPlayerSpawned( ply ) local chance = math.random( 1, 10000 ); if( chance <= 20 && chance >= 1 ) then print( string.format( "debug: %i\n", chance ) ); ply:Give( "weapon_ttt_knife" ); end if( chance >= 50 && chance <= 100 ) then print( string.format( "debug: %i\n", chance ) ); ply:Give( "weapon_ttt_knife" ); end if( chance >= 100 && chance <= 150 ) then print( string.format( "debug: %i\n", chance ) ); ply:Give( "weapon_ttt_knife" ); end end hook.Add( "PlayerInitialSpawn", "random", OnPlayerSpawned );[/CODE] also i have this file in addon on my server just for if i'm doing it wrong or something. edit:I added a debug but it not showing any messages.
Sorry, you need to Log In to post a reply to this thread.