Jump to content

مشآكلي My problems


Recommended Posts

  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Client Side !

addEventHandler("onClientGUIClick",root, 
function() 
if source == btnShut then 
triggerServerEvent("Shut",getLocalPlayer())   
     end 
end) 

Server Side !

addEvent("Shut",true) 
addEventHandler("Shut",root, 
function ()  
if hasObjectPermissionTo( resource, "function.shutdown" ) then 
end 
  

Link to comment

لول فهمتك غلط يصير كذا :

-- Server --

  
  
addEvent("on",true)  
addEventHandler("on",root,  
function () 
PlayerName = getPlayerName(source) 
addEventHandler("onPlayerChat", root, mute)     
outputChatBox(" "..PlayerName.." is Busy",root,255,255,255,true) 
end) 
  
addEvent("off",true)  
addEventHandler("off",root,  
function () 
 removeEventHandler("onPlayerChat", root, mute) 
outputChatBox(" "..PlayerName.." is Available",root,255,255,255,true)  
end 
) 
  
  
time = 30 
timer = {} 
  
    function mute(msg,type) 
        local find = string.find(msg,getPlayerName(source)) 
        if ( type == 0 and find ) then 
            setPlayerMuted(source,true) 
            outputChatBox("* You Are Muted For " .. time .. " " ,source,255,0,0) 
            timer[source] = setTimer(endMute,time * 1000,1,source) 
        end 
    end 
  
  
function endMute(player) 
    setPlayerMuted(player,false) 
    outputChatBox("* You Can Talk Now",player,0,255,0) 
end 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if ( isTimer(timer[source]) ) then 
            killTimer(timer[source]) 
        end 
    end 
) 
  
  
  

-- Client --

Wnd = guiCreateWindow(241,515,317,120,"No Subject",false) 
On = guiCreateButton(70,30,50,50,"On",false,Wnd) 
Off = guiCreateButton(10,30,50,50,"Off",false,Wnd) 
  
  
addEventHandler("onClientGUIClick",root, 
function() 
PlayerName = getPlayerName(localPlayer) 
if source == On then  
        triggerServerEvent("on",getLocalPlayer())   
       elseif source == Off then         
triggerServerEvent("off",getLocalPlayer())   
     end 
end) 
  
  
  
Link to comment
^

يعطيك العافيه

+

outputChatBox("  "..PlayerName.." is Available",root,255,255,0,true) 

اسم اللاعب ما يجي مع الاكواد يعني كذا يجيك

#070707The_#ff0000Best

هذا كود سيرفر ^

Link to comment

ابي اذا ضغط الزر ياكل كيك

سويتها كذا :

Client Side !

addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == btnKick then 
        triggerServerEvent("kick",getLocalPlayer())   
     end 
end) 

Server Side !

^

مخلبط*

addEvent("kick",true) 
addEventHandler("kick",root, 
function () 
kickPlayer ( "Kicked" ) 
end 
) 

^ ادري خطأ عشان كذا مابي احد يتفلسف!

Link to comment
ابي اذا ضغط الزر ياكل كيك

سويتها كذا :

Client Side !

addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == btnKick then 
        triggerServerEvent("kick",getLocalPlayer())   
     end 
end) 

Server Side !

^

مخلبط*

addEvent("kick",true) 
addEventHandler("kick",root, 
function () 
kickPlayer ( "Kicked" ) 
end 
) 

^ ادري خطأ عشان كذا مابي احد يتفلسف!

جرب او رد خبر

  
addEvent("kick", true) 
addEventHandler("kick", root, 
    function () 
        kickPlayer(source, "سبب الكيك") 
    end 
) 
Link to comment
ابي اذا ضغط الزر ياكل كيك

سويتها كذا :

Client Side !

addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == btnKick then 
        triggerServerEvent("kick",getLocalPlayer())   
     end 
end) 

Server Side !

^

مخلبط*

addEvent("kick",true) 
addEventHandler("kick",root, 
function () 
kickPlayer ( "Kicked" ) 
end 
) 

^ ادري خطأ عشان كذا مابي احد يتفلسف!

جرب او رد خبر

  
addEvent("kick", true) 
addEventHandler("kick", root, 
    function () 
        kickPlayer(source, "سبب الكيك") 
    end 
) 

يعطيك العافيه :wink:

Link to comment
ابي اذا ضغط الزر ياكل كيك

سويتها كذا :

Client Side !

addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == btnKick then 
        triggerServerEvent("kick",getLocalPlayer())   
     end 
end) 

Server Side !

^

مخلبط*

addEvent("kick",true) 
addEventHandler("kick",root, 
function () 
kickPlayer ( "Kicked" ) 
end 
) 

^ ادري خطأ عشان كذا مابي احد يتفلسف!

جرب او رد خبر

  
addEvent("kick", true) 
addEventHandler("kick", root, 
    function () 
        kickPlayer(source, "سبب الكيك") 
    end 
) 

يعطيك العافيه :wink:

الله يعافيك :mrgreen:

Link to comment

ERROR:client triggered serverside event car,but event is not added serverside

Client Side !

addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
         if source == btnCar then 
        triggerServerEvent("car",getLocalPlayer())   
     end 
end) 

Server Side !

addEvent("car", true) 
addEventHandler("car", root, 
function Car() 
    local x, y, z = getElementPosition ( source ) 
    local playerMoney = getPlayerMoney(source) 
    if playerMoney >= 0 then 
    takePlayerMoney (source,0) 
    vehicle = createVehicle ( 413, x, y, z + 2 ) 
    local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
    setVehicleColor( car, r, g, b ) 
    warpPedIntoVehicle(source, vehicle)  
    outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) 
    elseif playerMoney <= 0 then 
    outputChatBox("  >>#070707#0099ccYou'r Not Have #070707Money",source,255,0,0,true) 
    end 
end 
addEventHandler("car",getRootElement(),Car) 

Link to comment

Client Side !

addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
         if source == btnCar then 
        triggerServerEvent("car",getLocalPlayer())   
     end 
end) 

Server Side !

addEvent("car", true) 
addEventHandler("car", root, 
function () 
    local x, y, z = getElementPosition ( source ) 
    local playerMoney = getPlayerMoney(source) 
    if playerMoney >= 0 then 
    takePlayerMoney (source,0) 
    vehicle = createVehicle ( 413, x, y, z + 2 ) 
    local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
    setVehicleColor( car, r, g, b ) 
    warpPedIntoVehicle(source, vehicle)  
    outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) 
    elseif playerMoney <= 0 then 
    outputChatBox("  >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) 
    end 
end 
) 

Link to comment
Client Side !
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
         if source == btnCar then 
        triggerServerEvent("car",getLocalPlayer())   
     end 
end) 

Server Side !

addEvent("car", true) 
addEventHandler("car", root, 
function () 
    local x, y, z = getElementPosition ( source ) 
    local playerMoney = getPlayerMoney(source) 
    if playerMoney >= 0 then 
    takePlayerMoney (source,0) 
    vehicle = createVehicle ( 413, x, y, z + 2 ) 
    local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
    setVehicleColor( car, r, g, b ) 
    warpPedIntoVehicle(source, vehicle)  
    outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) 
    elseif playerMoney <= 0 then 
    outputChatBox("  >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) 
    end 
end 
) 

بس السياره ما تتلون مع ان فيه

math.random 

Edited by Guest
Link to comment

جرب

  
--SERVER  
addEvent("car", true) 
addEventHandler("car", root, 
function () 
    local x, y, z = getElementPosition ( source ) 
    local playerMoney = getPlayerMoney(source) 
    if playerMoney >= 0 then 
    takePlayerMoney (source,0) 
    vehicle = createVehicle ( 413, x, y, z + 2 ) 
    local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
    setVehicleColor( vehicle, r, g, b ) 
    warpPedIntoVehicle(source, vehicle)  
    outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) 
    elseif playerMoney <= 0 then 
    outputChatBox("  >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) 
    end 
end 
) 

Link to comment
جرب
  
--SERVER  
addEvent("car", true) 
addEventHandler("car", root, 
function () 
    local x, y, z = getElementPosition ( source ) 
    local playerMoney = getPlayerMoney(source) 
    if playerMoney >= 0 then 
    takePlayerMoney (source,0) 
    vehicle = createVehicle ( 413, x, y, z + 2 ) 
    local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
    setVehicleColor( vehicle, r, g, b ) 
    warpPedIntoVehicle(source, vehicle)  
    outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) 
    elseif playerMoney <= 0 then 
    outputChatBox("  >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) 
    end 
end 
) 

نفسها ما تغيرت + السيارات تتكرر :shock:

Link to comment
الموضوع عن الميوت وش دخله في السيارت؟

انا عشان ما اكثر مواضيع !

ولا تبي كل دقيقه وانا فاتح موضوع ؟!

:lol:

عشان مكتوب ميوت وتم الأفادة محد يدري أنك طلبت عن السيارات

Link to comment

اخر محاولة :)

-- client side 
  
addEventHandler ( "onClientGUIClick", getRootElement(), 
    function ( ) 
         if source == btnCar then 
         triggerServerEvent("getCar",getLocalPlayer())   
     end 
end) 
 -- server side 
addEvent("getCar", true) 
addEventHandler("getCar", getRootElement(), 
function () 
     local x, y, z = getElementPosition (source) 
    local playerMoney = getPlayerMoney(source) 
    if playerMoney >= 25000 then 
  takePlayerMoney (source,25000) 
    local Vh = createVehicle ( 413, x, y, z ) 
    setVehicleColor( Vh, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) 
    warpPedIntoVehicle(source, Vh)  
    outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) 
    elseif playerMoney <= 25000 then 
cancelEvent() 
    outputChatBox("  >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) 
    end 
end) 

ملاحظه : انت كاتب

مشاكلي my problem

غير

problem

لـ

problems

:D

Link to comment
اخر محاولة :)
-- client side 
  
addEventHandler ( "onClientGUIClick", getRootElement(), 
    function ( ) 
         if source == btnCar then 
         triggerServerEvent("getCar",getLocalPlayer())   
     end 
end) 
 -- server side 
addEvent("getCar", true) 
addEventHandler("getCar", getRootElement(), 
function () 
     local x, y, z = getElementPosition (source) 
    local playerMoney = getPlayerMoney(source) 
    if playerMoney >= 25000 then 
  takePlayerMoney (source,25000) 
    local Vh = createVehicle ( 413, x, y, z ) 
    setVehicleColor( Vh, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) 
    warpPedIntoVehicle(source, Vh)  
    outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) 
    elseif playerMoney <= 25000 then 
cancelEvent() 
    outputChatBox("  >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) 
    end 
end) 

ملاحظه : انت كاتب

مشاكلي my problem

غير

problem

لـ

problems

:D

ما ضبطت

المهم يعطيك العافيه خلاص موب لازم.

+ problems

ما انتبهت اني نسيت s الجمع.

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