91
Developers Corner / Help
« Last post by UwU me no advertise on June 13, 2020, 12:03:12 AM »My commands won't work, won't pop up in the xgui does not change anything. Ill paste the command below but sorry if it is trash i started lua yesterday.
[EDIT] - Timmy Use BBCode to format code snippet.
Code: Lua
- CATEGORY_NAME "My Ulx Stuff"
- ------------------------------Reset------------------------------
- function ulx.reset( calling_ply, target_ply )
- if target_ply:IsFrozen() then -- Checks if target is frozen
- ULib.tsayError ( calling_ply, v:Nick() .. " That boi is cold / frozen use !unfreeze to warm him up!"
- if target_ply:Alive() then
- target_ply:Kill() -- Kill the player
- if not target_ply:Alive() then
- target_ply:Spawn() -- Respawns the player
- ulx.fancyLogAdmin( calling_ply, true "#a respawned #t"
- end
- end
- local reset = ulx.command( CATEGORY_NAME, "ulx reset", ulx.reset, "!reset" )
- reset:addParam{ type=ULib.cmds.PlayersArg }
- reset:defualtAccess( ULib.ACCESS_ADMIN )
- reset:help( "resets the selected target. " )
[EDIT] - Timmy Use BBCode to format code snippet.