DiSaMe Posted February 16, 2008 Share Posted February 16, 2008 I have searched but found nothing that could help me. I also have looked at Hay gamemode code but I still can't solve the problem. This is very stupid question because code is so small. And I can't make it work. I want to start making gamemode from very simple code. Here it is: function joined ( ) fadeCamera(source,true) spawnPlayer(source,0.0,0.0,5.0) end AddEventHandler( "onPlayerJoin", getRootElement(), joined ) Nothing happens when I connect to the server. Could you help me to make player just spawn when connected? And sorry for my English. I'm from Lithuania. Link to comment
Ace_Gambit Posted February 16, 2008 Share Posted February 16, 2008 I have searched but found nothing that could help me. I also have looked at Hay gamemode code but I still can't solve the problem.This is very stupid question because code is so small. And I can't make it work. I want to start making gamemode from very simple code. Here it is: function joined ( ) fadeCamera(source,true) spawnPlayer(source,0.0,0.0,5.0) end AddEventHandler( "onPlayerJoin", getRootElement(), joined ) Nothing happens when I connect to the server. Could you help me to make player just spawn when connected? And sorry for my English. I'm from Lithuania. Maybe because lua is case-sensative? Try "addEventHandler" instead of "AddEventHandler". But this is just a wild guess... Link to comment
norby89 Posted February 16, 2008 Share Posted February 16, 2008 (edited) it should be addEventHandler Lua is case sensitive EDIT: meh you were faster than me Edited February 16, 2008 by Guest Link to comment
DiSaMe Posted February 16, 2008 Author Share Posted February 16, 2008 Thank you both! Now I can create my own gamemode It looks like LUA is too case-sensitive because in Pawn or C I didn't have to think about that. But perhaps it looks like because in Pawn that I used for SA-MP commands that have capital letters start with them too. And C - I didn't script much edit: and thanks to those who wanted to help me but were late Link to comment
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