onPlayerConnect crash - why?
- prana
- Closed
A new update is now available, introducing seasons and more!
-
-
[lua]
function onPlayerConnect(event)SendPlayerMessage(event.player,255,255,255,"Welcome on OUR Server. If there problems ask ADMINS: sunflyer01 or neoprana. Have fun!");
end
addEvent("PlayerConnect", onPlayerConnect);
[/lua]Oder:
[lua]
function onPlayerConnect(event)
event.player:SendPlayerMessage(255,255,255,"Welcome on OUR Server. If there problems ask ADMINS: sunflyer01 or neoprana. Have fun!");endaddEvent("PlayerConnect", onPlayerConnect);[/lua]Entschuldigung bin am Handy sag mal wie lautet die Fehlermeldung wird die Function anvisiert?
Aber ansonsten müsste es so gehen.
Viel Glück,
Marvinmauric
-
beides ging nicht aber ich habs inzwischen rausgefunden danke trotzdem
-
Kein ding was war es denn?
-
so macht man das event.player:sendTextMessage("[#FF0000]You are not an admin");
wobei ich mich frage woher soll ich wissen wie die event struktur aussieht ...
-
Could you translate your question in english ? Google Traduction isn't helping with dutch
-
Well I'm starting with LUA and I really don't have a clue about this ... not only the language looks on every platform different, there also no documentation from rising wold datascructures so ...
but if you want to greet player that login:
yo can see it how it work on our server otherland.servegame.com
-
For the documentation for Rising World datastructures, it should be soon available (I hope soooo much ^^)
You can also add something like :
CodeThere's a lot of event you can use
-
i actually look to count and get all ids of connected players names ... i mean to print them and so on
-
You can create a database through your LUA script, and onPlayerConnect you get the ID, put it in the DB, same on disconnect : you get the ID, you delet the DB lign that match this ID
This way you have a db with only connected player in
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!