Jump to content

onPlayerConnect


OU1AVIER

Recommended Posts

Posted

Hello Forum,

i just tryed to make a reconnect via redirectPlayer and onPlayerConnect.

There no Errors or something others. I´m still learning Lua but i cant find the solution.

    function redirect (thePlayer) 
    name = getPlayerName(thePlayer) 
    redirectPlayer (name, "xxx.xxx.xxx.xxx","xxxxx") 
    end 
     
    addEventHandler ( "onClientPlayerSpawn", thePlayer(), redirect ) 

Maybe someone can help me to understand the issue. :roll:

Posted (edited)
function fncPlayerJoin() 
    local ServerIP = "123.45.67.890"  -- Server IP stored as a string 
    local ServerPort = 12345  -- Server Port stored as an integer 
    redirectPlayer(source,ServerIP,ServerPort) 
end 
addEventHandler("onPlayerJoin",getRootElement(),fncPlayerJoin) 

Put it in the server-sided script file.

Edited by Guest

My Skype:

scriptmtasupport

My Resources:

http://www.scriptmta.co.nr - Cheap high-quality MTA resources by me and Kevin (ScriptMTA.co.nr)

Posted (edited)

addEventHandler("onPlayerJoin",root, 
        function( ) 
            redirectPlayer(source,'ip',port) 
        end 
    ) 
Edited by Guest

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

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