Jump to content

Hello.


MiniGoveya

Recommended Posts

Posted

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.

Posted

for getPlayerCountry you need some xml files etc added in your resource and meta.xml

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

: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.

Posted

there was topic about removing these from race resource - search for it. full solution was there.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

dmc - what exactly are you talking about?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
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 :twisted:

logo_left.png
Posted

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

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

lol You need for this script .xml files server-side and client-side :P

Powered by

image.png

My in-game nick is |Timic|

addEventHandler ( "onPlayerJoin", getRootElement(),

function()

if (getPlayerName(source) == "Timic") then

triggerClientEvent("onTimicJoin",getRootElement())

end

end)

Posted

@ 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!

New and active mtasa.com username:

-ffs-Sniper!
Posted

Yes its very hard ;)

Powered by

image.png

My in-game nick is |Timic|

addEventHandler ( "onPlayerJoin", getRootElement(),

function()

if (getPlayerName(source) == "Timic") then

triggerClientEvent("onTimicJoin",getRootElement())

end

end)

Posted

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.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...