iMr.3a[Z]eF Posted August 7, 2013 Share Posted August 7, 2013 ListSerial = { [1] = { 'D959022732DB64516435467F3D1BF5F4' }, -- Sojn [2] = { 'A5331B0D0A5919DBA1C19B1A278E68D4' }, -- d7om [3] = { '1715B68D93F4CDF04BAA065F5D4D14B2' }, -- Me [4] = { '2D7A67D844738FEA7562CEDBE812A3E2' } -- Mizo } addEventHandler('onResourceStart', root, function ( ) if getPlayerSerial( source ) == ListSerial[1] then setPlayerNametagText ( source, "سوجن" ) setPlayerNametagColor ( source, 255, 0, 0 ) elseif getPlayerSerial( source ) == ListSerial[2] then setPlayerNametagText ( source, "دحومي" ) setPlayerNametagColor ( source, 255, 0, 0 ) elseif getPlayerSerial( source ) == ListSerial[3] then setPlayerNametagText ( source, "عازف" ) setPlayerNametagColor ( source, 255, 0, 0 ) elseif getPlayerSerial( source ) == ListSerial[4] then setPlayerNametagText ( source, "ميزو" ) setPlayerNametagColor ( source, 255, 0, 0 ) end end) I want for those serials have a red nametag with arabic nametag too. the debug says the 'player' in getPlayerSerial() is bad pointer. Link to comment
Moderators IIYAMA Posted August 7, 2013 Moderators Share Posted August 7, 2013 You are using the wrong event, > "onPlayerJoin". Link to comment
iMr.3a[Z]eF Posted August 7, 2013 Author Share Posted August 7, 2013 Doesn't change anything. Link to comment
Moderators IIYAMA Posted August 7, 2013 Moderators Share Posted August 7, 2013 local ListSerial = { ["D959022732DB64516435467F3D1BF5F4"]=true, -- Sojn ["A5331B0D0A5919DBA1C19B1A278E68D4"]=true, -- d7om ["1715B68D93F4CDF04BAA065F5D4D14B2"}=true, -- Me ["2D7A67D844738FEA7562CEDBE812A3E2"]=true -- Mizo } addEventHandler('onPlayerJoin', root, function ( ) if ListSerial[getPlayerSerial( source )] then setPlayerNametagText ( source, "????" ) setPlayerNametagColor ( source, 255, 0, 0 ) end end) Link to comment
iMr.3a[Z]eF Posted August 7, 2013 Author Share Posted August 7, 2013 local ListSerial = { ["D959022732DB64516435467F3D1BF5F4"]=true, -- Sojn ["A5331B0D0A5919DBA1C19B1A278E68D4"]=true, -- d7om ["1715B68D93F4CDF04BAA065F5D4D14B2"}=true, -- Me ["2D7A67D844738FEA7562CEDBE812A3E2"]=true -- Mizo } addEventHandler('onPlayerJoin', root, function ( ) if ListSerial[getPlayerSerial( source )] then setPlayerNametagText ( source, "????" ) setPlayerNametagColor ( source, 255, 0, 0 ) end end) No, i want each serial have a difference text in nametag Link to comment
Moderators IIYAMA Posted August 7, 2013 Moderators Share Posted August 7, 2013 (edited) local ListSerial = { ["D959022732DB64516435467F3D1BF5F4"]="Sojn", -- ["A5331B0D0A5919DBA1C19B1A278E68D4"]="d7om", -- ["1715B68D93F4CDF04BAA065F5D4D14B2"]="iMr.3a[Z]eF", ["2D7A67D844738FEA7562CEDBE812A3E2"]="Mizo" } addEventHandler('onPlayerJoin', root, function ( ) local serialData = ListSerial[getPlayerSerial( source )] if serialData then setPlayerNametagText ( source, serialData ) setPlayerNametagColor ( source, 255, 0, 0 ) end end) Edited August 7, 2013 by Guest Link to comment
iMr.3a[Z]eF Posted August 7, 2013 Author Share Posted August 7, 2013 You had a mistake it line 4 it's ok 've fixed it let me try. EDIT: Doesn't works, whithout errors. Link to comment
Moderators IIYAMA Posted August 7, 2013 Moderators Share Posted August 7, 2013 ah yes, updated. let me test it. Link to comment
Moderators IIYAMA Posted August 7, 2013 Moderators Share Posted August 7, 2013 It seems there is no problem. But maybe you can better use setPlayerName instead of setPlayerNametagText . https://wiki.multitheftauto.com/wiki/SetPlayerName local ListSerial = { ["D959022732DB64516435467F3D1BF5F4"]="Sojn", ["A5331B0D0A5919DBA1C19B1A278E68D4"]="d7om", ["C57CA400888FD05D058D04571B4FA912"]="iMr.3a[Z]eF", ["2D7A67D844738FEA7562CEDBE812A3E2"]="Mizo" } addEventHandler('onPlayerJoin', root, function ( ) local serialData = ListSerial[getPlayerSerial( source )] if serialData then setPlayerName ( source, serialData) setPlayerNametagColor ( source, 255, 0, 0 ) end end) Link to comment
iMr.3a[Z]eF Posted August 7, 2013 Author Share Posted August 7, 2013 It's difference with Arabic text in nametag, iwant it Arabic. Link to comment
Moderators IIYAMA Posted August 7, 2013 Moderators Share Posted August 7, 2013 then you may have to use a custom dx name tag. Link to comment
iMr.3a[Z]eF Posted August 7, 2013 Author Share Posted August 7, 2013 No, thank you i've used private way without script. SOLVED 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