sckatchof Posted March 10, 2012 Share Posted March 10, 2012 hi guys i have try to make script when i chat in los stantos it show like this : (Ls)Sckatchof : my msg this is my script Server Side : local tab = { ['Los Santos'] = 'LS'; ['Las Venturas'] = 'LV'; ['San Fierro'] = 'SF'; } function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local playerX, playerY, playerZ = getElementPosition ( player ) local playerZoneName = getZoneName ( playerX, playerY, playerZ,true ) if playerZoneName == 'Los Santos' or playerZoneName == 'Las Venturas' or playerZoneName == 'San Fierro' then playerZoneName = tab[ playerZoneName ] else playerZoneName = 'None' end if (msgtype == 0) then outputChatBox("(".. playerZoneName ..")".. name ..":".. text, root, 255, 255, 255, true) end end cancelEvent ( ) addEventHandler("onPlayerChat", root, chatbox) Link to comment
X-SHADOW Posted March 10, 2012 Share Posted March 10, 2012 local tab = { ['Los Santos'] = 'LS'; ['Las Venturas'] = 'LV'; ['San Fierro'] = 'SF'; } function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local playerX, playerY, playerZ = getElementPosition ( source ) local playerZoneName = getZoneName ( playerX, playerY, playerZ,true ) if playerZoneName == 'Los Santos' or playerZoneName == 'Las Venturas' or playerZoneName == 'San Fierro' then playerZoneName = tab[ playerZoneName ] else playerZoneName = 'None' end if (msgtype == 0) then outputChatBox("(".. playerZoneName ..")".. name ..":".. text, root, 255, 255, 255, true) end end cancelEvent ( ) addEventHandler("onPlayerChat", root, chatbox) is there any errors shown to you ? if there are then post it here Link to comment
sckatchof Posted March 10, 2012 Author Share Posted March 10, 2012 (edited) i dont have any error it work thank you for help but when i write it show 2 times like this: (ls)gladiato : hi gladiato : hi Edited March 10, 2012 by Guest Link to comment
X-SHADOW Posted March 10, 2012 Share Posted March 10, 2012 local tab = { ['Los Santos'] = 'LS'; ['Las Venturas'] = 'LV'; ['San Fierro'] = 'SF'; } function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local playerX, playerY, playerZ = getElementPosition ( source ) local playerZoneName = getZoneName ( playerX, playerY, playerZ,true ) if playerZoneName == 'Los Santos' or playerZoneName == 'Las Venturas' or playerZoneName == 'San Fierro' then playerZoneName = tab[ playerZoneName ] else playerZoneName = 'None' end if (msgtype == 0) then outputChatBox("(".. playerZoneName ..")".. name ..":".. text, root, 255, 255, 255, true) end end cancelEvent ( ) cancelEvent( ) addEventHandler("onPlayerChat", root, chatbox) if you are runing freeromm stop it and run stealth and test the script Link to comment
top sniper Posted March 10, 2012 Share Posted March 10, 2012 use this function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) cancelEvent() Link to comment
X-SHADOW Posted March 10, 2012 Share Posted March 10, 2012 use this function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) cancelEvent() Wtf please let him test my post ! Link to comment
sckatchof Posted March 10, 2012 Author Share Posted March 10, 2012 local tab = { ['Los Santos'] = 'LS'; ['Las Venturas'] = 'LV'; ['San Fierro'] = 'SF'; } function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local playerX, playerY, playerZ = getElementPosition ( source ) local playerZoneName = getZoneName ( playerX, playerY, playerZ,true ) if playerZoneName == 'Los Santos' or playerZoneName == 'Las Venturas' or playerZoneName == 'San Fierro' then playerZoneName = tab[ playerZoneName ] else playerZoneName = 'None' end if (msgtype == 0) then outputChatBox("(".. playerZoneName ..")".. name ..":".. text, root, 255, 255, 255, true) end end cancelEvent ( ) cancelEvent( ) addEventHandler("onPlayerChat", root, chatbox) if you are runing freeromm stop it and run stealth and test the script still dont work but thank you for help . Link to comment
sckatchof Posted March 10, 2012 Author Share Posted March 10, 2012 use this function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) cancelEvent() i foreget cancelEvent() thank you sniper it work Link to comment
top sniper Posted March 10, 2012 Share Posted March 10, 2012 use this function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) cancelEvent() i foreget cancelEvent() thank you sniper it work no problem 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