i am “trying” to rewrite several proconrulz scripts to VU Mod style
several thing i manage to do, but this one is cracking my head.
ok, my lua coding level is not that great, but the basic idea this is imho simpel.
if i use the code below it seems to work.
but, it is not what i directly want.
local respawncounter=1
Events:Subscribe('Player:Respawn', function(player)
if respawncounter==1 then
print("****************** respawn event ****************"); -- to see in console for test
RCON:SendCommand("admin.say", {player.name .. " has spawned in the server", "all"})
respawncounter=respawncounter+1 if respawncounter==2 then end
end
end)
Yes this works, but it is a onetime action, when a seconds player spawns, no message.
so, is there something simpel that allows this to send the message only one time to the chat
for each player that spawns.
and no, the (‘Soldier:Spawn’, function(soldier) does not work for some reason here.