Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler("onPlayerJoin", getRootElement(), joinHandler)
- function joinHandler()
- local x = 1959.55
- local y = -1714.46
- local z = 15
- outputChatBox("Welcome to My Server", source)
- end
- addEvent("submitLogin",true)
- addEventHandler("submitLogin",root,loginHandler)
- function loginHandler(username,password)
- if username == "Misha" and password == "noob" then
- if (client) then
- spawnPlayer(client, 1959.55, -1714.46, 10)
- fadeCamera(client, true)
- outputChatBox("Welcome", client)
- end
- elseif username == "Faberge" and password == "Faberge" then
- if(client) then
- spawnplayer(client,1959.55, -1710.46, 10)
- fadecamera(client, true)
- outputChatBox("Welcome.", client)
- end
- else
- outputChatBox("Failed. Relog.",client)
- end
- end
- function createVehicleForPlayer(thePlayer, command, vehiclemodel, vehiclecolor)
- local x,y,z = getElementPosition(thePlayer)
- x= x + 2
- local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)
- if (createdVehicle ==false) then
- outputChatBox("You Fail, try again.",thePlayer)
- end
- end
- addCommandHandler("makeveh", createVehicleForPlayer)
- addEvent("movePlayerToPosition",true)
- addEventHandler("movePlayerToPosition",root,moveThePlayer)
- function playerDied(totalAmmo, killer, killerWeapon, bodypart)
- outputChatBox(getPlayerName(source) .. " Fail!")
- end
- addEventHandler("onPlayerWasted",getRootElement(),playerDied)
- function moveThePlayer(x,y,z,rotation)
- if x and y and z and rotation then
- local skin = getElementModel(client)
- spawnplayer(client,x,y,z,rotation,skin)
- setCameraTarget(client,client)
- end
- end
- addEvent("movePlayerToPosition",true)
- addEventHandler("movePlayerToPosition",root,moveThePlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement