Hallo,
Ich habe ein Medic Script dieses habe Ich nun etwas verändert:
Lua
function tiemedic_func ( player, cmd, target )
local target = findPlayerByName( target ) if target and target ~= player and getPedOccupiedVehicle ( target ) then if isMedic(player) then if getVehicleOccupant( getPedOccupiedVehicle ( player ) ) ~= target and getPedOccupiedVehicleSeat ( target ) > 0 then local x1, y1, z1 = getElementPosition ( player ) local x2, y2, z2 = getElementPosition ( target ) if getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) <= 5 then local boolean = not vioGetElementData ( target, "tied" ) vioSetElementData ( target, "tied", boolean ) toggleAllControls ( target, boolean ) if boolean then fix = "aus dem" else fix = "ins" end if fix == "ins " then addEventHandler( "onPlayerCommand", target, block_tiemedic_cmds ) elseif fix == "aus dem " then
opticExitVehicle ( target ) removeEventHandler ( "onPlayerCommand", target, block_tiemedic_cmds ) end if fix == "aus dem " then fadeCamera ( target, true, 0.5, 0, 0, 0 ) elseif isEvil ( player ) then fadeCamera ( target, false, 0.5, 0, 0, 0 ) end outputChatBox ( "Du hast "..getPlayerName(target).." "..fix.." Auto befördert!", player, 255, 140, 0 ) outputChatBox ( "Du wurdest von "..getPlayerName(player).." "..fix.." Auto befördert!", target, 255, 140, 0 ) else outputChatBox ( "Du bist zu weit weg!", player, 125, 0, 0 ) end else outputChatBox ( "Ungueltiges Ziel!", player, 125, 0, 0 ) end else outputChatBox ( "Du bist in einer ungueltigen Fraktion!", player, 125, 0, 0 ) end else outputChatBox ( "Ungueltiges Ziel!", player, 125, 0, 0 ) end end
addCommandHandler ( "frei", tiemedic_func )
Dies ist die tie Funktion nur für Medic angepasst.
Wennn ich einen ins Car packe, steht da: Du wurdest von "blablabla" ins auto befördert.
Nun möchte ich das Ich, wenn Ich /frei eingebe das dort steht: """" Sie aus dem Auto befördert.
Das steht dort auch Ich möchte nur das Ich wenn Ich /frei eingebe der Spieler ( target ) aus dem Medic Car geschmissen wird und dort steht "blblal" hat Sie aus dem Auto befördert.
Danke!
//edit:
hier noch mal das Script im Anhang.
MfG
Zerom3x