I planned to write a Lua: only 1 random player will be equipped Ak-74 when A ROUND STARTS ONLY (in zombie mode) and if that player became a zombie, he wont get Ak-74. :D.
This is my LUA. You can check and fix for me
Plz help me.
Thanks a lot
math.random(1,5)
addhook("startround","onStart") function onStart() local Players = player(0, "tableliving") local TableIndex = math.random(1, #Players) local ID = Players[TableIndex] if ID and player(ID, "exists") then parse("equip "..ID.." 30") end end