- Initiateur de la discussion
Akouniza
Nouveau né
- Messages
- 3
- Score réaction
- 0
- Points
- 20
Hey !
Avec des amis ont s'est lancer dans la création d'un serveur PropHunt.
Nous avons besoin d'une commande admin !forcetaunt mais a vrai dire nous sommes très mauvais pour ce qui est du lua.
Nous avons donc trouver un fichier forcetaunt qui avait l'air de correspondre a nos attentes ( crédit : therealist code )
Malgré tout nos efforts nous ne comprenons pas pourquoi, le code en lui même n'arrive pas a call
Si une âme charitable aurait l’amabilité de nous aider nous serions ravis
Cordialement,
Akou
Avec des amis ont s'est lancer dans la création d'un serveur PropHunt.
Nous avons besoin d'une commande admin !forcetaunt mais a vrai dire nous sommes très mauvais pour ce qui est du lua.
Nous avons donc trouver un fichier forcetaunt qui avait l'air de correspondre a nos attentes ( crédit : therealist code )
Malgré tout nos efforts nous ne comprenons pas pourquoi, le code en lui même n'arrive pas a call
PROP_TAUNTS
dans le fichier : sh_config.lua pour lire un taunt et le faire entendre aux autres joueur !Si une âme charitable aurait l’amabilité de nous aider nous serions ravis
Cordialement,
Akou
TheRealist Code:
function ulx.forcetaunt( calling_ply, target_plys, taunt ) for k,v in pairs (target_plys) do if v:Alive() then if v:Team() == "TEAM_PROPS" then random_taunt = table.Random(PROP_TAUNTS) v:EmitSound(random_taunt, 100) elseif v:Team() == "TEAM_HUNTERS" then random_taunt = table.Random(HUNTER_TAUNTS) v:EmitSound(random_taunt, 100) elseif v:Team() == "TEAM_SPECTATOR" then ULib.tsayError( v, "This player is dead or spectating." ) elseif v:Team() == "TEAM_UNASSIGNED" then ULib.tsayError( v, "This player is dead or spectating." ) end else ULib.tsayError( v, "This player is dead or spectating." ) end end ulx.fancyLogAdmin( calling_ply, "#A has forced #T to taunt.", target_plys )
end
local forcetaunt = ulx.command( "Prop Hunt", "ulx forcetaunt", ulx.forcetaunt, "!forcetaunt" )
forcetaunt:defaultAccess( ULib.ACCESS_ADMIN )
forcetaunt:addParam{ type=ULib.cmds.PlayersArg }
forcetaunt:help( "Forces the player to taunt" )