so far i know how to spawn the player, give a car with /car and give weapon with /ak47, thats it for now, im such a noob
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10
function joinHandler()
spawnPlayer(source, spawnX, spawnY, spawnZ)
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox("Welcome to My Server", source)
end
addEventHandler("onPlayerJoin", getRootElement(), joinHandler)
function consoleGive ( thePlayer, commandName, weaponID, ammo )
local status = giveWeapon ( thePlayer, 30, 200, true)
if ( not status) then
outputConsole ("Failed to give weapon", thePlayer)
end
end
addCommandHandler ( "ak47", consoleGive )
function createVehicleForPlayer(thePlayer, command, vehicleModel)
local x,y,z = getElementPosition(thePlayer) -- get the position of the player
x = x + 5
local createdVehicle = createVehicle(tonumber(602),x,y,z)
if (createdVehicle == false) then
outputChatBox("Failed to create vehicle.",thePlayer)
end
end
addCommandHandler("car", createVehicleForPlayer)
Also how do i see my xyz position while in game?