Jump to content

شباب


Recommended Posts

شو مشكله الكود ابي اول ما لاعب يدخل وانا حاطط سيرياله يدخله التيم تلقائي

local team1 = createTeam('Forces',0,255,0) 
  
addEventHandler("onResourceStart",root, 
function () 
if getPlayerSerial(source) == myserial then return end 
setPlayerTeam ( source , team1 ) 
setTeamFriendlyFire ( team1 , true ) 
  end 
end ) 

Link to comment
شو مشكله الكود ابي اول ما لاعب يدخل وانا حاطط سيرياله يدخله التيم تلقائي
local team1 = createTeam('Forces',0,255,0) 
  
addEventHandler("onResourceStart",root, 
function () 
if getPlayerSerial(source) == myserial then return end 
setPlayerTeam ( source , team1 ) 
setTeamFriendlyFire ( team1 , true ) 
  end 
end ) 

local team1 = createTeam('Forces',0,255,0) 
  
addEventHandler("onResourceStart",root, 
function () 
if getPlayerSerial(source) == "******" then -- ****** = Your serial ! 
setPlayerTeam ( source , team1 ) 
setTeamFriendlyFire ( team1 , true ) 
  end 
end ) 

Link to comment

local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if getPlayerSerial(v) == "serial" then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
            break 
        end 
    end 
end) 
Link to comment
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if getPlayerSerial(v) == "serial" then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
            break 
        end 
    end 
end) 

ممكن توضيح ليش سويت لوب للاعبين ؟

:oops:

يعني اللي رح يدخل التيم سيارة مثلا رح يصير لها التيم ولا ايش :lol::lol:

Link to comment
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if getPlayerSerial(v) == "serial" then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
            break 
        end 
    end 
end) 

ممكن توضيح ليش سويت لوب للاعبين ؟

:oops:

يعني اللي رح يدخل التيم سيارة مثلا رح يصير لها التيم ولا ايش :lol::lol:

سويت لوب يجيب جميع الاعبين

ثم يتحقق ان سيريال الاعب هو السيريال المطلوب

يحطه بالتيم ويسوي بريك للوب عشان يوقف عملية البحث عن السيريال

Link to comment

كذا يصيرر

local serial1 = { 
{"MySerial"} 
} 
  
  
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if getPlayerSerial(v) == "serial1" then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
            break 
        end 
    end 
end) 

Link to comment
كذا يصيرر
local serial1 = { 
{"MySerial"} 
} 
  
  
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if getPlayerSerial(v) == "serial1" then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
            break 
        end 
    end 
end) 

+ تقدر بنفس الجدول تنسخ اللي فوق وتحطها تحت وتسوي فارزة للي فوقها ويصير تحقق للكل , أي سيريال يتحقق منه يضيفه للتيم

Link to comment
كذا يصيرر
local serial1 = { 
{"MySerial"} 
} 
  
  
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if getPlayerSerial(v) == "serial1" then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
            break 
        end 
    end 
end) 

: كودك غلط ,, التصحيح

local Serials = { 
    ["theSerial"] = true, 
    ["theSerial"] = true, 
    ["theSerial"] = true, 
} 
  
  
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if Serials[getPlayerSerial(v)] then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
        end 
    end 
end) 
Link to comment
كذا يصيرر
local serial1 = { 
{"MySerial"} 
} 
  
  
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if getPlayerSerial(v) == "serial1" then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
            break 
        end 
    end 
end) 

: كودك غلط ,, التصحيح

local Serials = { 
    ["theSerial"] = true, 
    ["theSerial"] = true, 
    ["theSerial"] = true, 
} 
  
  
local team1 = createTeam('Forces',0,255,0) 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if Serials[getPlayerSerial(v)] then 
            setPlayerTeam(v , team1) 
            setTeamFriendlyFire(team1 , true) 
        end 
    end 
end) 

تمت الافاده

تسلم نصور

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...