Furious^ONE! Posted July 23, 2014 Posted July 23, 2014 I tried to make a script to give a taser but its not working. Help me please CODE: function giveTaser (player) team = getPlayerTeam ( giveTaser ) if getTeamName ( team ) ~= "Police" then return end giveWeapon ( source , 23,700 ) outputChatBox("Vous vous êtes equipé du Taser !",player) end addCommandHandler("equipertaser",giveTaser)
Max+ Posted July 23, 2014 Posted July 23, 2014 addCommandHandler ('equipertaser', function ( ) if getTeamName(getPlayerTeam(source)) == getTeamFromName('Police') then giveWeapon ( source, 23, 700 ) outputChatBox("Vous vous êtes equipé du Taser !",source, 255, 255, 0 ) end end )
AboShanab Posted July 23, 2014 Posted July 23, 2014 (edited) addCommandHandler ( "equipertaser", function ( player ) if ( getPlayerTeam ( player ) ) then if ( getPlayerTeam ( player ) == getTeamFromName ( "Police" ) ) then giveWeapon ( player, 23, 700 ) outputChatBox ( "Vous vous êtes equipé du Taser !", player, 255, 255, 0 ) end end end ) Edited July 23, 2014 by Guest
Furious^ONE! Posted July 23, 2014 Author Posted July 23, 2014 addCommandHandler ('equipertaser', function ( ) if getTeamName(getPlayerTeam(source)) == getTeamFromName('Police') then giveWeapon ( source, 23, 700 ) outputChatBox("Vous vous êtes equipé du Taser !",source, 255, 255, 0 ) end end ) Is an error : [03:50:31] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getPlayerTeam' [03:50:31] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getTeamName' [03:50:36] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getPlayerTeam' [03:50:36] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getTeamName' [03:50:02] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getPlayerTeam' [03:50:02] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getTeamName' [03:50:02] WARNING: @Taser_equipe\server.lua:4: Bad argument @ 'giveWeapon' [Expected element at argument 1, got nil]
justn Posted July 23, 2014 Posted July 23, 2014 (edited) Try this addCommandHandler ('equipertaser', function ( ) if (getTeamName(getPlayerTeam(source)) == "Police") then giveWeapon ( source, 23, 700 ) outputChatBox("Vous vous êtes equipé du Taser !",source, 255, 255, 0 ) end end ) Edited July 23, 2014 by Guest
AboShanab Posted July 23, 2014 Posted July 23, 2014 addCommandHandler ( "equipertaser", function ( player ) if ( getPlayerTeam ( player ) ) then if ( getPlayerTeam ( player ) == getTeamFromName ( "Police" ) ) then giveWeapon ( player, 23, 700 ) outputChatBox ( "Vous vous êtes equipé du Taser !", player, 255, 255, 0 ) end end end )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now