iPrestege Posted February 1, 2013 Posted February 1, 2013 Hello , i have a problem here in this script : function Police(text, type,source) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then local Police = getTeamFromName ( "Police" ) if ( Police ) then cancelEvent() outputChatBox("#0000FF* [Police] x "..getPlayerName ( source ).." :#ffFFff " .. text, getRootElement(), true ) end end end addEventHandler("onPlayerChat", getRootElement(), Police) Problem = Not Working need some help . am use it on server side . thanks ^ .
Castillo Posted February 1, 2013 Posted February 1, 2013 I don't really understand what are you trying to do, though, the first problem I see is that you are placing 'source' as argument, but 'source' is already defined.
||BuLLeT|| Posted February 1, 2013 Posted February 1, 2013 can you tell us more? like what is script for?
iPrestege Posted February 1, 2013 Author Posted February 1, 2013 I don't really understand what are you trying to do, though, the first problem I see is that you are placing 'source' as argument, but 'source' is already defined. I want if the player in the police team and a console group when he chating it will be like that : outputChatBox("#0000FF* [Police] x "..getPlayerName ( source ).." :#ffFFff " .. text, getRootElement(), true ) Chat : * [Police] x Mr.Pres[T]ege : text another one : * [Police] x Mr.Pres[T]ege : Hello Mta ( = and i use cancel event for non-repetition . i hope you understand me now .
||BuLLeT|| Posted February 1, 2013 Posted February 1, 2013 I don't really understand what are you trying to do, though, the first problem I see is that you are placing 'source' as argument, but 'source' is already defined. i think this is problem as castillo said
DNL291 Posted February 1, 2013 Posted February 1, 2013 outputChatBox("#0000FF* [Police] x "..getPlayerName ( source ).." :#ffFFff " .. text, getRootElement(), r, g, b, true ) Is correct.
Castillo Posted February 1, 2013 Posted February 1, 2013 function Police ( text, type ) local team = getPlayerTeam ( source ) if ( team and getTeamName ( team ) == "Police" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Console" ) ) then outputChatBox ( "#0000FF* [Police] x ".. getPlayerName ( source ) .." :#ffFFff " .. text, getRootElement(), true ) cancelEvent ( ) end end end addEventHandler ( "onPlayerChat", getRootElement(), Police )
iPrestege Posted February 1, 2013 Author Posted February 1, 2013 function Police ( text, type ) local team = getPlayerTeam ( source ) if ( team and getTeamName ( team ) == "Police" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Console" ) ) then outputChatBox ( "#0000FF* [Police] x ".. getPlayerName ( source ) .." :#ffFFff " .. text, getRootElement(), true ) cancelEvent ( ) end end end addEventHandler ( "onPlayerChat", getRootElement(), Police ) Thanks castillo works now but #color is not working but fixed thanks!
DNL291 Posted February 1, 2013 Posted February 1, 2013 To output with color codes, you must put the arguments: red, green, blue, before "true".
iPrestege Posted February 1, 2013 Author Posted February 1, 2013 @DNK i know that i do it like that but not working -_-" ? what,s the fucking problem : function Police ( text, type ) local team = getPlayerTeam ( source ) if ( team and getTeamName ( team ) == "Police" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Console" ) ) then outputChatBox ( "#0000FF* [Police] x ".. getPlayerName ( source ) .." :#ffFFff " .. text, root, true, 255, 0, 0) cancelEvent ( ) end end end addEventHandler ( "onPlayerChat", getRootElement(), Police )
DNL291 Posted February 1, 2013 Posted February 1, 2013 function Police ( text, type ) local team = getPlayerTeam ( source ) if ( team and getTeamName ( team ) == "Police" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Console" ) ) then outputChatBox ( "#0000FF* [Police] x ".. getPlayerName ( source ) .." :#ffFFff " .. text, root, 255, 0, 0, true) cancelEvent ( ) end end end addEventHandler ( "onPlayerChat", getRootElement(), Police )
iPrestege Posted February 2, 2013 Author Posted February 2, 2013 function Police ( text, type ) local team = getPlayerTeam ( source ) if ( team and getTeamName ( team ) == "Police" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Console" ) ) then outputChatBox ( "#0000FF* [Police] x ".. getPlayerName ( source ) .." :#ffFFff " .. text, root, 255, 0, 0, true) cancelEvent ( ) end end end addEventHandler ( "onPlayerChat", getRootElement(), Police ) Thank You "DNL" Works now [= .
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