Jump to content

Code_Dont Work


#Wassem

Recommended Posts

Client

  
GUIEditor = { 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        gamer = guiCreateWindow(471, 255, 382, 477, "وظيفه صانع اسلحه | ", false) 
        guiWindowSetSizable(gamer, false) 
        guiSetAlpha(gamer, 0.71) 
  
        GUIEditor.memo[1] = guiCreateMemo(9, 20, 363, 210, "                           وظيفه صانع الاسلحه الاصدار الاول\n\nما هي ؟ \nوكيف تربح منها ؟\nهي وظيفه تقوم بصنع سلاح عن طريق اوامر اف 8\n\ncreate1\ncreate2\n\n--\nالاصدار ثاني سوف يزيد الاوامر", false, gamer) 
        start = guiCreateButton(9, 379, 89, 88, "قبول ", false, gamer)     
    end 
) 
  
addEventHandler(''onClinetMarkerHit'', 
resourceRoot,function (elment) 
if element == getLocalPlayer ( ) then 
if source == MarkerM then 
guiSetVisible(gamer,true ) 
showCrusor(true ) 
end 
end 
end 

Server

markerM = createMarker(812.55450439453,-1106.7780761719,25.786380767822,'cylinder',3,255,255,0,155) 
createBlip ( 812.55450439453,-1106.7780761719,25.786380767822,49 ) 
addEventHandler('onMarkerHit',root, 
function (player) 
if source == markerM then 
if getElementType(player) == "player" then 
if getPlayerTeam(player) == getTeamFromName ( "No Team") then 
triggerClientEvent(player,"OpenWind",player) 
else 
 triggerClientEvent(player, "outputTopChat", root, "يجب ان تكون في فريق النو تيم لـ تأخذ وظيفة صانع اسلحه", 255, 255, 0) 
end 
end 
end 
end 
) 
addEventHandler(''onClinetGUIClick'', 
resourceRoot,function ( ) 
if (source == start ) then 
  
local id = 13 
local ammo = 133 
addCommandHandler ( "create", function ( Player ) 
 if ( id and ammo ~= tonumber ) then return end 
  if ( getPlayerMoney ( Player ) >= 500 ) then 
       takePlayerMoney(Player, 500) 
       giveWeapon ( Player, id, ammo ) 
       outputChatBox ( "** تم صنع و  اعطاءك سلأح", Player, 255, 0, 0, true ) 
      end 
end ) 
local id = 55 
local ammo = 55555 
addCommandHandler ( "create2", function ( Player ) 
 if ( id and ammo ~= tonumber ) then return end 
  if ( getPlayerMoney ( Player ) >= 500 ) then 
       takePlayerMoney(Player, 500) 
       giveWeapon ( Player, id, ammo ) 
       outputChatBox ( "** تم صنع و  اعطاءك سلأح", Player, 255, 0, 0, true ) 
      end 
end 
end 
end ) 
local marker = createMarker ( .... ) 
local Timer = { } 
  
addEventHandler ( "onMarkerHit", marker, function ( element ) 
    if getElementType ( element ) == "player" then  
        if isTimer( Timer[ element ] ) then  
            outputChatBox ( "لقد قمت بالدخول مسبقاً .. انتظر لمدة 5 دقائق", element ) 
            return 
        else   
            Timer[ element ] = setTimer( function( ) end, 30000, 1 ) 
        end 
    end 
end ) 

Link to comment

Where is the Event "OpenWind" and "outputTopChat" ?

Try "cylinder" instead of 'cylinder',

the blip icon is an optional argument so you have to use all optional arguments in createBlip.

You cannot use any optional arguments unless all previous arguments are also supplied.
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...