actions only admin can perform

  1. 8 years ago

    hi all !
    for my domination mission i set up some triggers to switch the weather and the time of the day (+1hour, +6 hours, overcast, sun ecc...).
    right now everyone in can call the trigger with a radio command. i wish to make so that only an admin can switch it.

    any suggestion ?
    huge thanks guys !

  2. Quick and dirty check for authority:

    if (serverCommandAvailable "#kick") then
    {
    	//Call your stuff
    }
    else
    {
    	hint "This action is only available for server admins";
    };

    Switch "#kick" to some server command only #adminLogged has access to. Has to wrap the trigger calls somehow.

  3. Thanks man !
    Sorry for my ignorance....but how should i put this code exactly ? In a script ?
    "Call your stuff " means i must put my code in a script ?
    Thanks !!

  4. On seconds thought, don't think that will work with triggers. "serverCommandAvailable" needs to be executed locally on the client you want to test, but the triggers are all on the server.

  5. Unless EDEN changes this, I believe editor placed triggers exist on all localities.

  6. For now i will just use alive debug console....anyway a way to perform this would be very useful !

 

or Sign Up to reply!