Jump to content

موضوع برمجه


xRaMx

Recommended Posts

ابي اعرف لو كودي ذا صح قبل اجربه

اذا هو بتيم معين , وقتل اي حد يروح مقتول مكان معين

local team1 = createTeam( "team1", 0, 255, 0 ) 
  
addEvent( "SetPTeam", true ) 
addEventHandler( "SetPTeam", root, 
    function( ) 
        setPlayerTeam( client, team1 ) 
        giveWeapon( client, 31, 500 ) 
        outputChatBox("You Now Take Job Killer", client) 
    end 
) 
  
addEventHandler ( "onPlayerWasted", root, 
    function( attacker ) 
        if getPlayerTeam( source ) == getTeamFromName( "team1" )then 
            local x, y, z = 10, 15, 2 --change or remove if defined somewhere else 
            spawnPlayer( source, x, y, z, 0, getElementModel(source)) 
        end 
    end 
) 

Link to comment
سطر14 استبدله بهذا

if getPlayerTeam( source ) and getPlayerTeam( source ) == getTeamFromName( "team1" ) then 

راح تواجه مشكله مع السباون فالافضل تستخدم التايمر play لو كنت مشغل

باقي صحيح ؟؟

+ وهل ممكن تسوي لي تايمر ومشكور واتمنى تشرح الي سويته عشان استفيد :D

Link to comment

ما يحتاج تايمر play اذا مو مستخدم

صاحب الموضوع انت تقصد بو قتلت احد وانت في تيم معين يسوي سباون للمقتول صح؟

-- Server Side # 
local team1 = createTeam( "team1", 0, 255, 0 ) 
  
addEvent( "SetPTeam", true ) 
addEventHandler( "SetPTeam", root, 
    function( ) 
        setPlayerTeam( client, team1 ) 
            giveWeapon( client, 31, 500 ) 
                outputChatBox("You Now Take Job Killer", client) 
    end 
) 
  
addEventHandler ( "onPlayerWasted", root, 
    function( attacker ) 
        if attacker and attacker ~= source and getElementType(attacker) == 'plaer' then 
            if getPlayerTeam( attacker ) and getPlayerTeam( attacker ) == getTeamFromName( "team1" ) then 
                local x, y, z = 10, 15, 2 -- احداثيات السباون اذا كان في التيم 
                    spawnPlayer( source, x, y, z, 0, getElementModel(source)) 
            end 
        end 
    end 
) 
Edited by Guest
Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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