Jump to content

مساعده


Recommended Posts

تم التطوير

ههههههههه

g_Players = getElementsByType("player") 
for i,aPlayer in ipairs(g_Players) 
    if aPlayer == getLocalPlayer() then 
        g_CurrentSpectated = i 
        break 
    end 
end 
  
function spectatePrevious(player)          
  
     if g_CurrentSpectated == 1 then 
         g_CurrentSpectated = #g_Players 
     else 
         g_CurrentSpectated = g_CurrentSpectated - 1 
     end 
    setCameraTarget(g_Players[g_CurrentSpectated]) 
end 
  
  
function spectateNext() 
     if g_CurrentSpectated == #g_Players then 
         g_CurrentSpectated = 1 
     else 
         g_CurrentSpectated = g_CurrentSpectated + 1 
     end 
    setCameraTarget(g_Players[g_CurrentSpectated]) 
end 
  
bindKey("arrow_l", "down", spectatePrevious) 
bindKey("arrow_r", "down", spectateNext) 
  
function delayedChat ( text ) 
    outputChatBox ( "Delayed text: " .. text ) 
end 
  
  
function mainFunction() 
        outputChatBox ("Instant text!") 
    setTimer ( function() 
        outputChatBox ( "5 second delay text!" ) 
    end, 5000, 1 ) 
end 
  
mainFunction() 
  
function greetingHandler ( message ) 
    outputChatBox ( "The client says: " .. message, source ) 
end 
addEvent( "onGreeting", true ) 
addEventHandler( "onGreeting", getRootElement(), greetingHandler ) 

Link to comment
  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

قصدك نسخت مثال الويكي

و الظاهر أنك نسيت تقرأ

This is an example of how one could implement a spectator function. Using the left and right arrow keys you can view other players. Note that this code isn't complete as it doesn't take into account joining or quitting players.

Link to comment
قصدك نسخت مثال الويكي

و الظاهر أنك نسيت تقرأ

This is an example of how one could implement a spectator function. Using the left and right arrow keys you can view other players. Note that this code isn't complete as it doesn't take into account joining or quitting players.

لول اقول شكله تابل حافظ الويكي ض1

Link to comment
g_Players = getElementsByType("player") 
for i,aPlayer in ipairs(g_Players) 
    if aPlayer == getLocalPlayer() then 
        g_CurrentSpectated = i 
        break 
    end 
end 
  
function spectatePrevious(player)         
  
     if g_CurrentSpectated == 1 then 
         g_CurrentSpectated = #g_Players 
     else 
         g_CurrentSpectated = g_CurrentSpectated - 1 
     end 
    setCameraTarget(g_Players[g_CurrentSpectated]) 
end 
  
  
function spectateNext() 
     if g_CurrentSpectated == #g_Players then 
         g_CurrentSpectated = 1 
     else 
         g_CurrentSpectated = g_CurrentSpectated + 1 
     end 
    setCameraTarget(g_Players[g_CurrentSpectated]) 
end 
  
bindKey("arrow_l", "down", spectatePrevious) 
bindKey("arrow_r", "down", spectateNext) 
  
function delayedChat ( text ) 
    outputChatBox ( "Delayed text: " .. text ) 
end 
  
  
function mainFunction() 
        outputChatBox ("Instant text!") 
    setTimer ( function() 
        outputChatBox ( "5 second delay text!" ) 
    end, 5000, 1 ) 
end 
  
mainFunction() 
  
function greetingHandler ( message ) 
    outputChatBox ( "The client says: " .. message, source ) 
end 
addEvent( "onGreeting", true ) 
addEventHandler( "onGreeting", getRootElement(), greetingHandler  

صح ولالالالالالالالالا

وقلي الخطا

Link to comment

سويت كود سوبر نار صح ولالا وفولو لي الخطا

function delayedChat ( player ) 
    outputChatBox ( "Delayed text: " .. text ) 
end 
  
setTimer ( delayedChat, 1000, 1, "Hello, World!" ) 
function takeCash ( thePlayer, command, amount ) 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 1500) then ر 
  
    takePlayerMoney(source,1500) 
  
function mainFunction(player) 
        outputChatBox ("Instant text!") 
    setTimer ( function() 
        outputChatBox ( "5 second delay text!" ) 
    end, 5000, 1 ) 
end 
mainFunction(player) 

Link to comment
سويت كود سوبر نار صح ولالا وفولو لي الخطا
function delayedChat ( player ) 
    outputChatBox ( "Delayed text: " .. text ) 
end 
  
setTimer ( delayedChat, 1000, 1, "Hello, World!" ) 
function takeCash ( thePlayer, command, amount ) 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 1500) then ر 
  
    takePlayerMoney(source,1500) 
  
function mainFunction(player) 
        outputChatBox ("Instant text!") 
    setTimer ( function() 
        outputChatBox ( "5 second delay text!" ) 
    end, 5000, 1 ) 
end 
mainFunction(player) 

جايب كود من الويكي ولآصقه

ومخربط فيه وضايف اشياء

وسويت وسويت كود

تراك منت متعلم بهذي الطريقة

Link to comment

بدل ما تجلس تنسخ بأكواد الويكي و تحطها هنا وتقول صح أو لا

جربها بنفسك و شوفها تشتغل أو لا

و إذا ما تشتغل تعال و حط كودك و قل وش المشكلة و أيش أنت تبي تسوي بالضبط

:? و الي مو داري وش الطبخه لا يرد الموضوع وصل 5 صفحات

Link to comment
بدل ما تجلس تنسخ بأكواد الويكي و تحطها هنا وتقول صح أو لا

جربها بنفسك و شوفها تشتغل أو لا

و إذا ما تشتغل تعال و حط كودك و قل وش المشكلة و أيش أنت تبي تسوي بالضبط

:? و الي مو داري وش الطبخه لا يرد الموضوع وصل 5 صفحات

صح عليك والله

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