Jump to content

script


tiesjan

Recommended Posts

function welcome() 
for i,player in pairs(getElementsByType("player")) do 
local name = getPlayerName(player) 
outputChatBox("Welcome"..name,player) 
end 
end 
addCommandHandler("welcome",welcome) 

next time try to use wiki and make a par of code

Edited by Guest
Link to comment

The wiki has all the functions, that exists.

With it's arguments, mostly examples.

So what is "i don't know how to do that getplayername thing "

Ehm,

getPlayerName(player) 

Is it so hard?

You won't get nowhere, by Copy+Paste.

Can you try doing this yourself?

functions you will need:

addEventHandler ( "welcome" , function ( player , cmd , playerName ) 
local target = getPlayerFromName ( playerName ) 
outputChatBox ( getPlayerName ( target ) ) 

Link to comment

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