Hallo,
Ich habe heute mal angefangen, mich ein wenig mit dem Vio Extended Script zu beschäftigen. Dabei wollte ich eine neue Fraktion öffnen ; Ballas.
Ich habe die createFactionVehicles, gate, allround, spawnpoint, chat, client, gunshop und settings neu geschrieben.
Doch das einzige was klappt, ist der Teamchat, die FDepots und die fskins?
Kann mir vielleicht jemand helfen, warum zB keine Fcars spawnen, oder das Gate nicht da ist? Ich habe die exakten Koordinaten benutzt. Hier einige Beispiele:
Cars
createFactionVehicle ( 566, -2706.7998046875, 1444.900390625, 7, 0, 0, 265.99548339844, 3, 3, 0, 8, 9 ) -- Tahoma 1
Gate
ballasgate = createObject( 980, -2656.3000488281, 1441.5999755859, 8.8999996185303, 0, 0, 270 )
local ballas_gate_moving = false
function ballasgate_func(player, command)
local x, y, z = getElementPosition( player )
if isballas (player) or isOnDuty(player) then
if getDistanceBetweenPoints3D ( x, y, z, -2656.3000488281, 1441.5999755859, 8.8999996185303 ) <= 10 then
if not ballas_gate_moving then
moveObject ( ballasgate, 2500, -2656.3000488281, 1441.5999755859, 3.4000000953674 )
ballas_gate_moving = true
else
moveObject ( ballasgate, 2500, -2656.3000488281, 1441.5999755859, 3.4000000953674 )
ballas_gate_moving = false
end
end
end
end
addCommandHandler("mv", ballasgate_func)
Spawnpunkt
if faction == 10 then
vioSetElementData ( player, "spawnpos_x", -2689.9782714844 )
vioSetElementData ( player, "spawnpos_y", 1455.6364746094 )
vioSetElementData ( player, "spawnpos_z", 7.1015625 )
vioSetElementData ( player, "spawnrot_x", 0 )
vioSetElementData ( player, "spawnint", 0 )
vioSetElementData ( player, "spawndim", 0 )
triggerClientEvent ( player, "infobox_start", getRootElement(), "\n\nSpawnpunkt\ngeaendert!", 5000, 0, 125, 0 )
end
Das sind die Hauptprobleme die ich nicht weiß, wie man sie behebt. Wäre nett wenn mir jemand helfen könnte, denn ich bin unerfahren im scripten.
LG, Danke.