Jump to content

Recommended Posts

  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

function showClientImage() 
   guiCreateStaticImage( 500, 450, 250, 250, "4.png", false ) 
     local theTeam = createTeam ( teamName ) 
     setPlayerTeam ( source, theTeam ) 
     triggerServerEvent ( 'setTeam', getLocalPlayer ( ) ) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage ) 
  

ماعلرفت شلون اخليه اذا يضغط على الصورة يروح الفريق

Link to comment

كلنت

  function showClientImage() 
    img= guiCreateStaticImage( 500, 450, 250, 250, "4.png", false ) 
    guiSetAlpha ( img, 0.7 ) 
end 
addEventHandler( "onClientResourceStart", root, showClientImage ) 
function click() 
if(source==img)then 
  triggerServerEvent ("setTeam", getLocalPlayer ( ) ) 
end 
end 
addEventHandler("onClientGUIClick", root,click) 
  

سيرفر

  
team = createTeam("team",0,0,0) 
addEvent("setTeam",true) 
addEventHandler("setTeam", root, 
function() 
setPlayerTeam(source,team) 
end) 

Edited by Guest
Link to comment

جرب ..

Client :

function showClientImage() 
    img= guiCreateStaticImage( 500, 450, 250, 250, "4.png", false ) 
    guiSetAlpha ( img, 0.7 ) 
end 
addEventHandler( "onClientResourceStart", root, showClientImage ) 
  
addEventHandler( "onClientGUIClick", root, function() 
    if source == img then  
        triggerServerEvent ( 'setTeam', getLocalPlayer () ) 
    end 
end) 

Server :

theTeam = createTeam ( "ADMIN" ) 
  
addEvent( "setTeam", true ) 
function setTheTeam( source ) 
    setPlayerTeam ( source, theTeam ) 
end 
addEventHandler( "setTeam", root, setTheTeam ) 

سبقني مجنون فيك :)

* تعديل ..

Edited by Guest
Link to comment

[2012-10-30 23:44:56] 410 restarted successfully

[2012-10-30 23:45:05] restart: Requested by Console

[2012-10-30 23:45:05] restart: Resource restarting...

[2012-10-30 23:45:05] Stopping 410

[2012-10-30 23:45:05] Resource '410' changed, reloading and starting

[2012-10-30 23:45:05] Starting 410

[2012-10-30 23:45:05] SCRIPT ERROR: 410\1.lua:8: 'then' expected near '='

[2012-10-30 23:45:05] WARNING: Loading script failed: 410\1.lua:8: 'then' expected near '='

[2012-10-30 23:45:05] 410 restarted successfully

Link to comment
[2012-10-30 23:44:56] 410 restarted successfully

[2012-10-30 23:45:05] restart: Requested by Console

[2012-10-30 23:45:05] restart: Resource restarting...

[2012-10-30 23:45:05] Stopping 410

[2012-10-30 23:45:05] Resource '410' changed, reloading and starting

[2012-10-30 23:45:05] Starting 410

[2012-10-30 23:45:05] SCRIPT ERROR: 410\1.lua:8: 'then' expected near '='

[2012-10-30 23:45:05] WARNING: Loading script failed: 410\1.lua:8: 'then' expected near '='

[2012-10-30 23:45:05] 410 restarted successfully

جرب حقي ^

Link to comment

[2012-10-30 23:42:37] start: Resource '410' started

[2012-10-30 23:43:00] restart: Requested by Console

[2012-10-30 23:43:00] restart: Resource restarting...

[2012-10-30 23:43:00] Stopping 410

[2012-10-30 23:43:00] Resource '410' changed, reloading and starting

[2012-10-30 23:43:00] Starting 410

[2012-10-30 23:43:00] ERROR: 410\1.lua:1: attempt to call global 'guiCreateStaticImage' (a nil value)

Link to comment
[2012-10-30 23:42:37] start: Resource '410' started

[2012-10-30 23:43:00] restart: Requested by Console

[2012-10-30 23:43:00] restart: Resource restarting...

[2012-10-30 23:43:00] Stopping 410

[2012-10-30 23:43:00] Resource '410' changed, reloading and starting

[2012-10-30 23:43:00] Starting 410

[2012-10-30 23:43:00] ERROR: 410\1.lua:1: attempt to call global 'guiCreateStaticImage' (a nil value)

جرب الحين ^

Link to comment
[2012-10-30 23:42:37] start: Resource '410' started

[2012-10-30 23:43:00] restart: Requested by Console

[2012-10-30 23:43:00] restart: Resource restarting...

[2012-10-30 23:43:00] Stopping 410

[2012-10-30 23:43:00] Resource '410' changed, reloading and starting

[2012-10-30 23:43:00] Starting 410

[2012-10-30 23:43:00] ERROR: 410\1.lua:1: attempt to call global 'guiCreateStaticImage' (a nil value)

انت حاط كود الكلنت في الميتا سيرفر

عاكسها أنت :lol:

> author="Yourname" version="1.0" /> ="1.lua" type="client" /> ="2.lua" type="server" /> src="4.png" />>

بدلته لك جرب لو ماصلح جب الخطأ واكتبه

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