MiniGoveya Posted October 3, 2010 Posted October 3, 2010 Hey dudes, as we are today? I hope well. I was trying to create something like this: * JOIN: MiniGoveya joined from: Caracas, Venezuela (VE). But as a rare thing ^ ^ did not work. Script: function onPlayerConnect( source ) if getPlayerCountry( source ) then outputChatBox("#FFF000* JOIN:"..getPlayerName( source ).."#FFF000 joined from: "..getPlayerCountry( source ).." !", getRootElement(), 255, 255, 255, true ) end end addEventHandler("onPlayerJoin", getRootElement (), onPlayerConnect) meta.xml: What did I wrong? see you later.
BinSlayer1 Posted October 3, 2010 Posted October 3, 2010 getPlayerCountry? I dont think this function is built-in mta you'll have to script the function i'm afraid
Discord Moderators Zango Posted October 3, 2010 Discord Moderators Posted October 3, 2010 Found something while searching > viewtopic.php?f=91&t=29092
dzek (varez) Posted October 3, 2010 Posted October 3, 2010 for getPlayerCountry you need some xml files etc added in your resource and meta.xml
MiniGoveya Posted October 3, 2010 Author Posted October 3, 2010 :l ok, thanks for all and thanks to all. EDIT: other thing, how can delete from my scoreboard: *racerank *checkpoints and all that things to my style? I have understood, that is a .lua file in the race resource, but I do not know what it is.
dzek (varez) Posted October 3, 2010 Posted October 3, 2010 there was topic about removing these from race resource - search for it. full solution was there.
[DMC] Posted October 9, 2010 Posted October 9, 2010 dmc - what exactly are you talking about? in our server we got a locate Join: Player joined from Country(..) i know him, he joins our server sometimes and he just stole it... (client side) he doesnt got the serverside because its ours
dzek (varez) Posted October 9, 2010 Posted October 9, 2010 but the code above looks like server side (outputChatBox arguments and onPlayerJoin event which is server side) even though he tries to run it as client side ;p
Timic Posted October 11, 2010 Posted October 11, 2010 lol You need for this script .xml files server-side and client-side
SHC//Sniper Posted October 14, 2010 Posted October 14, 2010 @ DMC: This can't be stolen client sided. Just take a look at the arguments of 'outputChatBox'! There is an argument called 'getRootElement()' that is only available in server side scripts. BTW: The function 'getPlayerCountry' is a internal function of the 'admin' resource, so the script above must be INSIDE of the admin resource. To solve this problem just put the script into your 'admin' resource and add it to the meta.xml! But you should use a CallRemote function instead of the admin function. But this is more complicated!
dzek (varez) Posted October 14, 2010 Posted October 14, 2010 Timic, i dont understand your random posts. If you have nothing to say or dont have idea what are somebody is talking about - don't post. Keep playing for example.
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