• Add player ent
    9 replies, posted
[lua] local noobs = table.Copy(players) table.RemoveByValue(noobs, murderer) local magnum = table.Random(noobs) if IsValid(ent2) then ent2:Give("weapon_ent2") end local ent1 = table.Random(noobs) if IsValid(ent1) then ent:Give("weapon_ent1") end [/lua] How to prevent the issuance of one player?
if #players.GetAll() == 1 ?
[QUOTE=JasonMan34;48879282]if #players.GetAll() == 1 ?[/QUOTE] At issue should be issued one time, without repetition [lua] if IsValid(ent1) then crowbar:Give("ent1") end
[QUOTE=giraff;48879317]At issue should be issued one time, without repetition [lua] if IsValid(ent1) then crowbar:Give("ent1") end[/QUOTE] I am rofling so bad right now! Your trying to give a variable called crowbar an entity which is actully stringed. Look up the Give function.
[QUOTE=tzahush;48879332]I am rofling so bad right now! Your trying to give a variable called crowbar an entity which is actully stringed. Look up the Give function.[/QUOTE] Umm what? ply:Give( String weapon name ) That's exactly what he's doing Wtf is crowbar and ent2 tho?
[QUOTE=JasonMan34;48879346]Umm what? ply:Give( String weapon name ) That's exactly what he's doing Wtf is ent1 and ent2 tho?[/QUOTE] [lua] local noobs = table.Copy(players) table.RemoveByValue(noobs, murderer) local magnum = table.Random(noobs) if IsValid(magnum) then magnum:Give("weapon_magnum") end [/lua] I need to give weapons again, but to give the other player without repeating
[QUOTE=giraff;48879357][lua] local noobs = table.Copy(players) table.RemoveByValue(noobs, murderer) local magnum = table.Random(noobs) if IsValid(magnum) then magnum:Give("weapon_magnum") end [/lua] I need to give weapons again, but to give the other player without repeating[/QUOTE] Bruh English please... If you're having trouble try [URL="https://facepunch.com/showthread.php?t=1460926"]this[/URL] but honest to god I have no idea what you want to do ...
[QUOTE=JasonMan34;48879346]Umm what? ply:Give( String weapon name ) That's exactly what he's doing Wtf is crowbar and ent2 tho?[/QUOTE] U seriously cant see it? Crowbar is a name of a weapon, and ent1 is the entity he is trying to give it to lol..
[QUOTE=tzahush;48879467]U seriously cant see it? Crowbar is a name of a weapon, and ent1 is the entity he is trying to give it to lol..[/QUOTE] I gave as an example .....
Your variable names are cancer. I can't understand whats going on.
Sorry, you need to Log In to post a reply to this thread.