justboy Posted November 15, 2014 Share Posted November 15, 2014 بسم الله الرحمن الرحيم انا سويت نافذة فيها ايديت وزر المهم مع بعضهم يغيروا اسم اللاعب والحمد الله شغاله تمام بس عندي استفسار كيف اخلي النك يطلع عربي او مزخرف زي مودات السوبر نك وشذي , Link to comment
K1NG Posted November 15, 2014 Share Posted November 15, 2014 : خذ الي تبيه من هنا -- Server Side # addCommandHandler ( "supernick", function ( player, _, nick ) if ( nick ) and ( string.len ( nick ) <= 80 ) then local acc = getPlayerAccount ( player ) if ( acc ) and not ( isGuestAccount ( acc ) ) and ( isObjectInACLGroup ( "user." .. getAccountName ( acc ), aclGetGroup ( "Admin" ) ) ) then setElementData ( player, "CustomTag", tostring ( nick ) ) outputChatBox ( "[superNick]#FFFFFF Your SuperNick is: " .. tostring ( nick ) .. " #FFFFFF.", player, 255, 136, 0, true ) else outputChatBox ( "[ERROR] #ffffffOops! You are not allowed to do this.", player, 255, 0, 0, true ) end end end ) addEventHandler ( "onPlayerChat", root, function ( msg ) local r, g, b = getPlayerNametagColor ( source ) local value = getElementData ( source, "CustomTag" ) if ( value ) then cancelEvent ( ) outputChatBox( value .. " : #FFFFFF" .. msg, root, r, g, b, true ) end end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if ( acc ) and not ( isGuestAccount ( acc ) ) and ( getAccountData ( acc, "CustomTag" ) ) then setElementData ( player, "CustomTag", getAccountData( acc, "CustomTag" ) ) end end end ) addEventHandler ( "onPlayerLogin", root, function ( _, acc ) if ( getAccountData ( acc, "CustomTag" ) ) then setElementData ( source, "CustomTag", getAccountData ( acc, "CustomTag" ) ) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) local acc = getPlayerAccount ( source ) if ( acc ) and not ( isGuestAccount ( acc ) ) and ( getElementData ( source, "CustomTag" ) ) then setAccountData ( acc, "CustomTag", getElementData ( source, "CustomTag" ) ) end end ) Link to comment
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