Jump to content

Recommended Posts

  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

Posted
هل بالامكان عمل

gui خفي؟

ووضع صورة فيه؟

والله انا مثلك

يمكن حد يفيدنا :D

الا رسول الله

بأبي انت وأمي يا رسول الله

--------------------

Posted

من guieditor

جرب حط صورة بدون

guiwindow

بس صورة

:shock:

الا رسول الله

بأبي انت وأمي يا رسول الله

--------------------

Posted
مثلا اذا ضغطت على الصورة يوديني فريق
guiCreateStaticImage 
'onClientGUIClick' 
triggerServerEvent 

setPlayerTeam 

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted
triggerServerEvent

ذي شنو تسوي؟

triggerServerEvent ( 'setTeam', getLocalPlayer ( ) )  

عشان تعطي الاعب تيم

لأن وضع الاعب في فريق سيرفر بس

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted
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 ) 
  

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

Posted (edited)

كلنت

  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

#~BlackBird~#

Posted (edited)

جرب ..

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
Posted

[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

Posted
[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

جرب حقي ^

#~BlackBird~#

Posted

[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)

Posted
[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)

جرب الحين ^

#~BlackBird~#

Posted (edited)

اكتب

debugscript 3

وقول وش يطلعلك

.

.

.

تآكد انك حاط الصوره بملف ال

.zip

وتآكد ان الصورة في ملف الكلنت

Edited by Guest

F4MZM4.gif

Posted
[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" />>

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

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

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