• select job
    2 replies, posted
[PHP] CreateConVar( "job", 1, FCVAR_SERVER_CAN_EXECUTE, FCVAR_CLIENTCMD_CAN_EXECUTE ) function irp_job( ply ) ply:SetTeam( GetConVar( "job" ):GetInt() ) ply:Spawn() end concommand.Add( "changejob", irp_job ) [/PHP] How to make what each player could change jobs? I set the console "job 1" (President) and "changejob", and getting them, but if somebody else wants to change jobs, he can only go as president. ie Server sees only the value of my convar
Why not just use this: [lua] concommand.Add("changejob", function (ply, cmd, args) if table.getn(args) != 1 then return end ply:SetTeam(args[1]) ply:Spawn() end) [/lua] Then you can use "changejob 1" to set yourself as President.
The argument goes as a table?
Sorry, you need to Log In to post a reply to this thread.