Jump to content

ممكن كود


MR:SADIQ

Recommended Posts

guiCreateStaticImage -- كلنت 
guiSetVisible -- كلنت 
createTeam -- سيرفر 
setPlayerTeam --  سيرفر 
spawnPlayer -- سيرفر 
giveWeapon -- سيرفر 
setElementModel -- كلنت و سيرفر 
triggerServerEvent -- استخدم الترايقر لـ اكواد السيرفر 
"OnClientGUIClick" -- الايفنت يوم تضغط زر 

Link to comment

function gimmeATeam ( source, commandName, teamName )

local newTeam = createTeam ( teamName ) -- create a new team with the specified name

if newTeam then -- if it was successfully created

setPlayerTeam ( source, newTeam ) -- add the player to the new team

end

end

addCommandHandler("giveteam", gimmeATeam)

function assignNewTeam ( source, commandName, teamName )

local theTeam = createTeam ( teamName ) -- create a new team with the specified name

if theTeam then -- if it was successfully created

setPlayerTeam ( source, theTeam ) -- add the player to the new team

end

end

addCommandHandler ( "gimmeateam", assignNewTeam )

function unassignTeam ( source, commandName )

local theTeam = getPlayerTeam ( source ) -- Check if the player is on a team

if theTeam then -- this player is on a team, so we can remove them from it

setPlayerTeam ( source, nil ) -- remove the player from the current team

end

end

addCommandHandler ( "takeawaymyteam", unassignTeam )

-- Get a table of all the players

players = getElementsByType ( "player" )

-- Go through every player

for playerKey, playerValue in ipairs(players) do

-- Spawn them at the desired coordinates

spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 )

end

Link to comment
function gimmeATeam ( source, commandName, teamName )

local newTeam = createTeam ( teamName ) -- create a new team with the specified name

if newTeam then -- if it was successfully created

setPlayerTeam ( source, newTeam ) -- add the player to the new team

end

end

addCommandHandler("giveteam", gimmeATeam)

function assignNewTeam ( source, commandName, teamName )

local theTeam = createTeam ( teamName ) -- create a new team with the specified name

if theTeam then -- if it was successfully created

setPlayerTeam ( source, theTeam ) -- add the player to the new team

end

end

addCommandHandler ( "gimmeateam", assignNewTeam )

function unassignTeam ( source, commandName )

local theTeam = getPlayerTeam ( source ) -- Check if the player is on a team

if theTeam then -- this player is on a team, so we can remove them from it

setPlayerTeam ( source, nil ) -- remove the player from the current team

end

end

addCommandHandler ( "takeawaymyteam", unassignTeam )

-- Get a table of all the players

players = getElementsByType ( "player" )

-- Go through every player

for playerKey, playerValue in ipairs(players) do

-- Spawn them at the desired coordinates

spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 )

end

:D:D:D

ويش مسوي

هذه مو كود امثله من الويكي

Edited by Guest
Link to comment
ابغي كود 3 صور تطلع على شاشة بعد ما الاعب يسجل دخول

كل صوره تيم+سلاح+مكان محدد

:fadein::mrgreen:

مو مجرب

----------- Server Side ! 
addEventHandler("onResourceStart", resourceRoot, start) 
spawnPlayer ( playerValue, x, y, z,0,skinID ) ---- x y z الاحداثيات ---- skinID رقم الشخصيه 
createTeam("a") 
addEvent ( "OnClientGUIClick", true ) 
 addEventHandler ( "OnClientGUIClick", getRootElement(),createTeam ) 
 function start() 
     setPlayerTeam(getRandomPlayer(), a) 
     triggerServerEvent ( "setPlayerTeam", getLocalPlayer() ) 
 end 
 function giveWeaponsOnSpawn () 
     giveWeapon ( source, 31, 200 )  31 = ID Weapon  - 200 Amount  
end 
 setElementModel ( createTeam, setPlayerTeam, spawnPlayer, giveWeapon ) 
 addEventHandler("onResourceStart", resourceRoot, function() setTimer(start, 50, 1)  
end 
) 

  
------ Client Side ! 
function showClientImage() 
    guiCreateStaticImage( "Name.png", true ) ---- Name اسم الصورة 
    guiSetVisible ( Name, true ) --------Name اسم الصورة  
end 
  
  
  

:mrgreen::mrgreen::arrowleft:

Link to comment
ابغي كود 3 صور تطلع على شاشة بعد ما الاعب يسجل دخول

كل صوره تيم+سلاح+مكان محدد

:fadein::mrgreen:

مو مجرب

----------- Server Side ! 
addEventHandler("onResourceStart", resourceRoot, start) 
spawnPlayer ( playerValue, x, y, z,0,skinID ) ---- x y z الاحداثيات ---- skinID رقم الشخصيه 
createTeam("a") 
addEvent ( "OnClientGUIClick", true ) 
 addEventHandler ( "OnClientGUIClick", getRootElement(),createTeam ) 
 function start() 
     setPlayerTeam(getRandomPlayer(), a) 
     triggerServerEvent ( "setPlayerTeam", getLocalPlayer() ) 
 end 
 function giveWeaponsOnSpawn () 
     giveWeapon ( source, 31, 200 )  31 = ID Weapon  - 200 Amount  
end 
 setElementModel ( createTeam, setPlayerTeam, spawnPlayer, giveWeapon ) 
 addEventHandler("onResourceStart", resourceRoot, function() setTimer(start, 50, 1)  
end 
) 

  
------ Client Side ! 
function showClientImage() 
    guiCreateStaticImage( "Name.png", true ) ---- Name اسم الصورة 
    guiSetVisible ( Name, true ) --------Name اسم الصورة  
end 
  
  
  

:mrgreen::mrgreen::arrowleft:

:lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol:

OnClientGUIClick

setPlayerTeam

onResourceStart

:lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol:

Link to comment
ابغي كود 3 صور تطلع على شاشة بعد ما الاعب يسجل دخول

كل صوره تيم+سلاح+مكان محدد

:fadein::mrgreen:

مو مجرب

----------- Server Side ! 
addEventHandler("onResourceStart", resourceRoot, start) 
spawnPlayer ( playerValue, x, y, z,0,skinID ) ---- x y z الاحداثيات ---- skinID رقم الشخصيه 
createTeam("a") 
addEvent ( "OnClientGUIClick", true ) 
 addEventHandler ( "OnClientGUIClick", getRootElement(),createTeam ) 
 function start() 
     setPlayerTeam(getRandomPlayer(), a) 
     triggerServerEvent ( "setPlayerTeam", getLocalPlayer() ) 
 end 
 function giveWeaponsOnSpawn () 
     giveWeapon ( source, 31, 200 )  31 = ID Weapon  - 200 Amount  
end 
 setElementModel ( createTeam, setPlayerTeam, spawnPlayer, giveWeapon ) 
 addEventHandler("onResourceStart", resourceRoot, function() setTimer(start, 50, 1)  
end 
) 

  
------ Client Side ! 
function showClientImage() 
    guiCreateStaticImage( "Name.png", true ) ---- Name اسم الصورة 
    guiSetVisible ( Name, true ) --------Name اسم الصورة  
end 
  
  
  

:mrgreen::mrgreen::arrowleft:

:lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol:

OnClientGUIClick

setPlayerTeam

onResourceStart

:lol::lol::lol::lol::lol::lol::lol::lol::lol::lol::lol:

نسيت :$

Link to comment

اتوقع كذا

IMG = guiCreateStaticImage(0.8262, 0.2604, 0.1221, 0.1536, "logo.png", true)--logo.pngاسم الصورة الأولى 
setTimer ( guiStaticImageLoadImage, 10000, 1, IMG, "xda.png" )--xda.pngاسم الصورة الثانيه  
  

!! يستبدل الصورة الأولى بالثانيه :D

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