Jump to content

تم الافاده


yazan

Recommended Posts

Mr عندك أخطاْء ~

---ServerSide 
addEvent('spawn1', true) 
addEventHandler('spawn1', root, 
function() 
    spawnPlayer(source,x, y, z) 
end 
) 
addEvent('spawn2', true) 
addEventHandler('spawn2', root, 
function() 
    spawnPlayer(source,x, y, z) 
end 
) 
  
addEventHandler('onPlayerWasted', root, 
function(attacker, weapon) 
    if(getElementType(attacker) == 'player') then 
    spawnPlayer(source,x, y, z) 
    else 
    spawnPlayer(source,x , y, z) 
end 
end 
) 

---ClientSide 
key = "حط الزر" 
  
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) 
  
function openWin () 
    if guiGetVisible (GUIEditor_Window[1]) then    
       guiSetVisible (GUIEditor_Window[1], false)  
       showCursor(false) 
    else 
        guiSetVisible (GUIEditor_Window[1], true) 
        showCursor(true) 
    end  
end 
bindKey(key, "down", openWin) 
  
addEventHandler("onClientPlayerJoin", root, 
    function () 
        guiSetVisible ( GUIEditor_Window[1] ,true) 
        showCursor (true) 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if source == GUIEditor_Image[1] then 
            triggerServerEvent("spawn1",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        elseif source == GUIEditor_Image[2] then 
            triggerServerEvent("spawn2",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        end 
    end 
) 

Link to comment
  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Mr عندك أخطاْء ~
---ServerSide 
addEvent('spawn1', true) 
addEventHandler('spawn1', root, 
function() 
    spawnPlayer(source,x, y, z) 
end 
) 
addEvent('spawn2', true) 
addEventHandler('spawn2', root, 
function() 
    spawnPlayer(source,x, y, z) 
end 
) 
  
addEventHandler('onPlayerWasted', root, 
function(attacker, weapon) 
    if(getElementType(attacker) == 'player') then 
    spawnPlayer(source,x, y, z) 
    else 
    spawnPlayer(source,x , y, z) 
end 
end 
) 

---ClientSide 
key = "حط الزر" 
  
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) 
  
function openWin () 
    if guiGetVisible (GUIEditor_Window[1]) then    
       guiSetVisible (GUIEditor_Window[1], false)  
       showCursor(false) 
    else 
        guiSetVisible (GUIEditor_Window[1], true) 
        showCursor(true) 
    end  
end 
bindKey(key, "down", openWin) 
  
addEventHandler("onClientPlayerJoin", root, 
    function () 
        guiSetVisible ( GUIEditor_Window[1] ,true) 
        showCursor (true) 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if source == GUIEditor_Image[1] then 
            triggerServerEvent("spawn1",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        elseif source == GUIEditor_Image[2] then 
            triggerServerEvent("spawn2",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        end 
    end 
) 

:lol: إنت إللي عندك أخطاء

إللي بكودك ما لها قيمة else لآن الـ

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

أما إذا إنقتل بأي شي ثاني فراح يكون بالهجولة, فيروح لسباون الهجولة

Link to comment

--------Client Side

  
  
local key = f10 
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) 
  
  
function Open() 
if getVisible(GUIEditor_Window[1]) then 
guiSetVisible(GUIEditor_Window[1],true) 
showCursor(true) 
else 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor(false) 
end 
bindKey("key","down",Open) 
  
addEventHandler("onClientGUIClick",root, 
function () 
      if source == GUIEditor_Image[1] then 
triggerServerEvent("spawn1",localPlayer) 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor(false) 
elseif source == GUIEditor_Image[2]then 
triggerServerEvent("spawn2",localPlayer) 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor(false) 
end 
) 
  

------Server Side

  
addEvent("spawn1",true) 
addEventHandler("spawn1",root, 
function() 
   spawnPlayer(source,x,y,z)-----------بأحداثيات الي تبيه ينقله لها اذا ضغط ع الصورهx,y,zبدل  
end 
) 
  
  
addEvent("spawn2",true) 
addEventHandler("spawn2",root, 
function() 
   spawnPlayer(source,x,y,z)-----------بأحداثيات الي تبيه ينقله لها اذا ضغط ع الصورهx,y,zبدل  
end 
) 

Link to comment
--------Client Side
  
  
local key = f10 
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) 
  
  
function Open() 
if getVisible(GUIEditor_Window[1]) then 
guiSetVisible(GUIEditor_Window[1],true) 
showCursor(true) 
else 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor(false) 
end 
bindKey("key","down",Open) 
  
addEventHandler("onClientGUIClick",root, 
function () 
      if source == GUIEditor_Image[1] then 
triggerServerEvent("spawn1",localPlayer) 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor(false) 
elseif source == GUIEditor_Image[2]then 
triggerServerEvent("spawn2",localPlayer) 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor(false) 
end 
) 
  

------Server Side

  
addEvent("spawn1",true) 
addEventHandler("spawn1",root, 
function() 
   spawnPlayer(source,x,y,z)-----------بأحداثيات الي تبيه ينقله لها اذا ضغط ع الصورهx,y,zبدل  
end 
) 
  
  
addEvent("spawn2",true) 
addEventHandler("spawn2",root, 
function() 
   spawnPlayer(source,x,y,z)-----------بأحداثيات الي تبيه ينقله لها اذا ضغط ع الصورهx,y,zبدل  
end 
) 

هو يبغى في الكود لو مات اللاعب يرجع لنفس السباون

-_-"كودك بس لو ضغط الصورة

ولو مات مدري وين السباون بيكون

Link to comment

جربت كودي ؟؟

أعتقد يسير كذا

--> server

addEvent("spawn1",true) 
addEventHandler("spawn1", root,  
    function spawn1 () 
        spawnPlayer(source,x ,y ,z) 
    end 
) 
  
addEvent("spawn2",true) 
addEventHandler("spawn2", root, 
    function spawn2 () 
        spawnPlayer(source,x ,y ,z) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function (attacker,weapon) 
        if (getElementType(attacker) == "player") then 
            if (getElementType(weapon) == "weapon") then 
                spawnPlayer(source, x, y, z) -- هنا بدل بإحداثيات الحرب 
            else 
                spawnPlayer(source, x, y, z) -- هنا بدل بإحداثيات الهجولة 
            end 
        end 
    end 
) 

--> client

  
key = "حط الزر" 
  
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) 
  
function openWin () 
    if guiGetVisible (GUIEditor_Window[1]) then    
       guiSetVisible (GUIEditor_Window[1], false)  
       showCursor(false) 
    else 
        guiSetVisible (GUIEditor_Window[1], true) 
        showCursor(true) 
    end  
end 
bindKey(key, "down", openWin) 
  
addEventHandler("onClientPlayerJoin", root, 
    function () 
        guiSetVisible ( GUIEditor_Window[1] ,true) 
        showCursor (true) 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if source == GUIEditor_Image[1] then 
            triggerServerEvent("spawn1",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        elseif source == GUIEditor_Image[2] then 
            triggerServerEvent("spawn2",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        end 
    end 
) 

:P جربه وقولي

Link to comment
ما شتغل يا شباب سعدوووني والله محتاجه

آسف نسيت إند خذ

function wasted() 
spawnPlayer (source,x,y,z) 
end 
addEventHandler('onPlayerWasted', root,wasted) 

اذا ما ضبط جرب ذا

function wasted() 
spawnPlayer (source,x,y,z,0,46)-----46 = الشخصيه 
end 
addEventHandler('onPlayerWasted', root,wasted) 

Link to comment
اخوي بدون ما اجربه ما وصلت لطلبي لنه ودي اول ما يدخل سيرفر العاب ططلع له و لو يبي بيغير قيم مود من حرف

:lol: ههههههههه إنت شكلك ما طليت فيه أصلاً

كودي يطلع أول ما يخش اللاعب, لأن فيه

"onClientPlayerJoin" 

ويطلع بزر أنا حاطلك إنك إنت تختاره أول الكود فوق

key = "الزر" 

كيف تقولي ما وصلت

--> server
addEvent("spawn1",true) 
addEventHandler("spawn1", root,  
    function spawn1 () 
        spawnPlayer(source,x ,y ,z) 
    end 
) 
  
addEvent("spawn2",true) 
addEventHandler("spawn2", root, 
    function spawn2 () 
        spawnPlayer(source,x ,y ,z) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function (attacker,weapon) 
        if (getElementType(attacker) == "player") then 
            if (getElementType(weapon) == "weapon") then 
                spawnPlayer(source, x, y, z) -- هنا بدل بإحداثيات الحرب 
            else 
                spawnPlayer(source, x, y, z) -- هنا بدل بإحداثيات الهجولة 
            end 
        end 
    end 
) 

--> client

  
key = "حط الزر" 
  
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) 
  
function openWin () 
    if guiGetVisible (GUIEditor_Window[1]) then    
       guiSetVisible (GUIEditor_Window[1], false)  
       showCursor(false) 
    else 
        guiSetVisible (GUIEditor_Window[1], true) 
        showCursor(true) 
    end  
end 
bindKey(key, "down", openWin) 
  
addEventHandler("onClientPlayerJoin", root, 
    function () 
        guiSetVisible ( GUIEditor_Window[1] ,true) 
        showCursor (true) 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if source == GUIEditor_Image[1] then 
            triggerServerEvent("spawn1",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        elseif source == GUIEditor_Image[2] then 
            triggerServerEvent("spawn2",getLocalPlayer()) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        end 
    end 
) 

لآ أضمن عمله لكن جرب ثمـ إحكمـ

Link to comment
This event is triggered when a player joins a server. It is triggered for all players except the local player, as the local player joins the server before their client-side resources are started. It would also be possible for two players to join within a few seconds of each other and for the two players' scripts may not receive onClientPlayerJoin events as their scripts wouldn't have started yet.
Link to comment
تابل يعني لزم يكون اومر سيرفر مو كلنت
ما شتغل يا شباب سعدوووني والله محتاجه

آسف نسيت إند خذ

function wasted() 
spawnPlayer (source,x,y,z) 
end 
addEventHandler('onPlayerWasted', root,wasted) 

اذا ما ضبط جرب ذا

function wasted() 
spawnPlayer (source,x,y,z,0,46)-----46 = الشخصيه 
end 
addEventHandler('onPlayerWasted', root,wasted) 

Link to comment

شغآل + مجرب

عليك تغيير الاحداثيات بس ~

--ClientSide :D

key = "F6" 
  
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) 
  
function openWin () 
    if guiGetVisible (GUIEditor_Window[1]) then    
       guiSetVisible (GUIEditor_Window[1], false)  
       showCursor(false) 
    else 
        guiSetVisible (GUIEditor_Window[1], true) 
        showCursor(true) 
    end  
end 
bindKey(key, "down", openWin) 
  
addEventHandler("onClientPlayerJoin", root, 
    function () 
        guiSetVisible ( GUIEditor_Window[1] ,true) 
        showCursor (true) 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function (player) 
        if (source == GUIEditor_Image[1]) then 
        triggerServerEvent("spawn1", localPlayer, localPlayer) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        elseif source == GUIEditor_Image[2] then 
        triggerServerEvent("spawn2", localPlayer, localPlayer) 
            guiSetVisible ( GUIEditor_Window[1] ,false) 
            showCursor (false) 
        end 
    end 
) 

--ServerSide

addEvent('spawn1', true) 
addEventHandler('spawn1', root, 
function(player) 
    spawnPlayer(player, 22.223, 19.252, 10.2424) 
    outputChatBox('You Are Now in Hajwlah',player, 255, 255,0) 
end 
) 
addEvent('spawn2', true) 
addEventHandler('spawn2', root, 
function(player) 
    spawnPlayer(player, 22.2442, 16.252, 10.2424) 
    outputChatBox('You Are Now in BaseMode',player, 255, 255,0) 
end 
) 

Meta.xml

    "yazn" version="0.9" type="script" author="yazn" description="spawnscript"/> 
     
    

Link to comment

غير ذا

addEventHandler("onClientPlayerJoin", root, 
    function () 
        guiSetVisible ( GUIEditor_Window[1] ,true) 
        showCursor (true) 
    end 
) 

إلى

addEventHandler("onClientResourceStart", resorceRoot, 
    function () 
        guiSetVisible ( GUIEditor_Window[1] ,true) 
        showCursor (true) 
    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...