Advertisement
Seregamil

first work

Jul 29th, 2013
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. --[[
  2.  
  3. By Seregamil
  4.  
  5.  
  6.  
  7.  
  8.  
  9. ]]
  10.  
  11.  
  12. addEventHandler("onPlayerJoin", getRootElement(), user_connect)
  13. addEventHandler("onPlayerQuit", getRootElement(), user_leave)
  14. addEventHandler("onPlayerChat", getRootElement(), user_chat)
  15. addEventHandler("onPlayerSpawn", getRootElement(), user_spawn)
  16.  
  17. function user_connect()
  18.   local red, green, blue = math.random (50, 255), math.random (50, 255), math.random (50, 255)
  19.   setPlayerNametagColor(source, red, green, blue)
  20.  
  21.   outputChatBox("* ".. getPlayerName(source) .." is connected")
  22.   --user_spawn(source)
  23. end
  24.  
  25. function user_leave(quitType)
  26.     outputChatBox("* ".. getPlayerName(source) .." has left server ( ".. quitType .." )")
  27. end
  28.  
  29. function user_chat( message, messageType )
  30.     if(messageType == 0) then  
  31.         local red, green, blue = getPlayerNametagColor(source)
  32.         outputChatBox(getPlayerName(source)..": #FFFFFF"..message, root, red, green, blue, true )    
  33.     end
  34. end
  35.  
  36. function user_spawn( posX, posY, posZ, spawnRotation, theSkin, theInterior )
  37.     posX = 145.64
  38.     posY = 526.65
  39.     posZ = 23.53
  40.     spawnRotation = 90.0
  41.     theSkin = 244
  42.     theInterior = 0
  43.    
  44.     spawnPlayer ( source, posX, posY, posZ, spawnRotation, theSkin , theInterior)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement