mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	start of work moving commands to lua
This commit is contained in:
		
							
								
								
									
										22
									
								
								data/scripts/commands/gm/mypos.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								data/scripts/commands/gm/mypos.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| require("global"); | ||||
|  | ||||
| properties = { | ||||
|     permissions = 0, | ||||
|     parameters = "", | ||||
|     description = "prints your current in-game position (different to map coords)", | ||||
| } | ||||
|  | ||||
| function onTrigger(player) | ||||
|     local pos = player:GetPos(); | ||||
|     local x = pos[0]; | ||||
|     local y = pos[1]; | ||||
|     local z = pos[2]; | ||||
|     local rot = pos[3]; | ||||
|     local zone = pos[4]; | ||||
|        | ||||
|     local messageID = MESSAGE_TYPE_SYSTEM_ERROR; | ||||
|     local sender = "[mypos] "; | ||||
|     local message = string.format("current position X:%d Y:%d Z:%d (Rotation: %d) Zone:%d", x, y, z, rot, zone); | ||||
|  | ||||
|     player:SendMessage(messageID, sender, message); | ||||
| end; | ||||
		Reference in New Issue
	
	Block a user