Jump to content

setTeamFriendlyFire < تمت الافآدةة


Recommended Posts

-- Client

addEventHandler("onClientGUIClick", root, 
function (player) 
if (source == button) then 
showCursor(false) 
triggerServerEvent("FriendlyFire",localPlayer) 
      end 
end) 

-- Server

addEvent("FriendlyFire",true) 
addEventHandler("FriendlyFire",root, 
fucntion() 
Team = createTeam(...) 
setTeamFriendlyFire ( Team, false ) 
end) 

^ Debug :

WARNING: folder\server.lua:5: Bad argument @ 'setTeamFriendlyFire' 

-----------------------------------------------------------------------------------------------------

local marker = createMarker ( ... ) 
car = {} 
function Hit (player) 
if ( getElementType(player) == "player" ) then 
                    destroyElement(car[player]) 
      end 
end 
addEventHandler("onMarkerHit",marker,Hit) 

^ Debug :

WARNING:myMod\server.lua:4: Bad argument @ 'getElementType'[Expected element at argument 1] 

Edited by Guest
Link to comment
addEvent("FriendlyFire",true) 
addEventHandler("FriendlyFire",root, 
function( ) 
        Team = createTeam(....) 
        if not Team then return end 
        setTeamFriendlyFire (Team,false) 
        outputChatBox("setTeamFriendlyFire = true",source,0,255,0) 
end 
) 

Link to comment
addEvent("FriendlyFire",true) 
addEventHandler("FriendlyFire",root, 
function( ) 
        Team = createTeam(....) 
        if not Team then return end 
        setTeamFriendlyFire (Team,false) 
        outputChatBox("setTeamFriendlyFire = true",source,0,255,0) 
end 
) 

^ يعطيك العآفيهه,

+ getElementType وش الحل معهآ ^

Link to comment
local marker = createMarker ( ... ) 
car = {} 
addEventHandler("onMarkerHit",marker, 
    function (player) 
        if getElementType(player) == "player" then 
            setElementPosition(...) 
            car[player] = createVehicle(...) 
            warpPedIntoVehicle(...) 
        end 
    end 
) 
local Marker = createMarker ( ... ) 
addEventHandler("onMarkerHit",Marker, 
    function ( player ) 
    if ( getElementType(player) == "player" ) then 
                    destroyElement(car[player]) 
            end 
    end 
) 

Edited by Guest
Link to comment
اي سطر؟ اطرحة :/
local marker = createMarker ( ... ) 
car = {} 
function Hit (player) 
if ( getElementType(player) == "player" ) then 
                    destroyElement(car[player]) 
      end 
end 
addEventHandler("onMarkerHit",marker,Hit) 

^ Debug :

WARNING:myMod\server.lua:4: Bad argument @ 'getElementType'[Expected element at argument 1] 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...