Jump to content

فكرة رائعة


Recommended Posts

  • Replies 102
  • Created
  • Last Reply

Top Posters In This Topic

اجل وانا وش احطه ؟؟

المهم لا نتقاتل وش لسا نكمل في الكود

حط بدل root

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

في طريقة ثانية كذآ

  
addEventHandler ("onClientGUIClick",root, 
function (  ) 
if source == Button then 
triggerServerEvent ( "Mta", localPlayer ) 
       end 
  end 
) 
  

الكود خلصنآه :lol:

Link to comment
هههههههههه بس كذا يضغط على الزر يجيه عدد عشوائي من الفلوس

يب هذا المطلوب لآننا حطينا

math.random 

Event : onClientResourceStart 
setWeather 
setTime 
setSunColor 
  

addEventHandler ("onClientResourceStart",resourceRoot, 
function (  ) 
setWeather ( 7 ) 
  
end 
) 
  

Link to comment
  
triggerServerEvent 
Event : 'onClientGUIClick' 
giveWeapon 
takePlayerMoney 
getPlayerMoney 
  

  
addEvent("TEP",true) 
addEventHandler("TEP",root, function ( ) 
if ( getPlayerMoney(client) =< 1000 ) then 
-- أكمل 
takePlayerMoney(client,1000) 
else 
-- أكمل 
end 
 end) 

Edited by Guest
Link to comment

server =

addEvent("TEP",true) 
addEventHandler("TEP",root, 
function () 
local money = getPlayerMoney(source)                                
    if (money > 1000) then  
giveWeapon ( source , 38 , 50000 ) 
takePlayerMoney(source,1000) 
outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) 
else 
outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) 
  end 
end) 

Client =

addEventHandler('onClientGUIClick',root, 
function () 
triggerServerEvent("TEP",getLocalPlayer()) 
end) 

Edited by Guest
Link to comment
addEvent("TEP",true) 
addEventHandler("TEP",root, function ( ) 
if ( getPlayerMoney(client) >= 1000 ) then 
giveWeapon(client,35) 
takePlayerMoney(client,1000) 
else 
outputChatBox("You dont have enough money ! " ,client,255,0,0,false) 
end 
end) 

')' expected near '='

'' expected near 'else'

'' expected near 'end'

'' expected near 'end'

:lol::lol::lol::lol::lol::lol::lol:

Link to comment
server =
addEvent("TEP",true) 
addEventHandler("TEP",root, 
function(player) 
local money = getPlayerMoney(source)                                
    if (money > 1000) then  
giveWeapon ( source , 38 , 50000 ) 
takePlayerMoney(source,1000) 
outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) 
else 
outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) 
  end 
end) 

Client =

addEventHandler('onClientGUIClick',root, 
function () 
triggerServerEvent("TEP",getLocalPlayer()) 
end) 

طيب انت حطيت player معرفه ولا استخدمتها

Link to comment
server =
addEvent("TEP",true) 
addEventHandler("TEP",root, 
function(player) 
local money = getPlayerMoney(source)                                
    if (money > 1000) then  
giveWeapon ( source , 38 , 50000 ) 
takePlayerMoney(source,1000) 
outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) 
else 
outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) 
  end 
end) 

Client =

addEventHandler('onClientGUIClick',root, 
function () 
triggerServerEvent("TEP",getLocalPlayer()) 
end) 

طيب انت حطيت player معرفه ولا استخدمتها

معرفه بس مدري ليه مسوي دبل فـ

outputChatBox

تعديل على سيرفر حقه فقط فـ

outputChatBox

addEvent("TEP",true) 
addEventHandler("TEP",root, 
function(player) 
local money = getPlayerMoney(source)                               
    if (money > 1000) then 
giveWeapon ( source , 30 , 50000 ) 
takePlayerMoney(source,1000) 
outputChatBox ( "You Have Now Weapon 38 ",source,255 ,255 ,255 , true ) 
else 
outputChatBox ( "You No Have Money !! ",source,255 ,255 ,255  , true ) 
  end 
end) 

Link to comment
server =
addEvent("TEP",true) 
addEventHandler("TEP",root, 
function(player) 
local money = getPlayerMoney(source)                                
    if (money > 1000) then  
giveWeapon ( source , 38 , 50000 ) 
takePlayerMoney(source,1000) 
outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) 
else 
outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) 
  end 
end) 

Client =

addEventHandler('onClientGUIClick',root, 
function () 
triggerServerEvent("TEP",getLocalPlayer()) 
end) 

طيب انت حطيت player معرفه ولا استخدمتها

player ماراح تتعرف لانك بالتريقر

مو حاط ارقمنت لها

triggerServerEvent("TEP",localPlayer, localPlayer) 

كذا يصير

Link to comment

Server Side

addEvent( "Minigun", true )  
addEventHandler ( "Minigun", root, function (    ) 
    if ( getPlayerMoney ( source ) >= 4000 ) then 
        takePlayerMoney ( source, 4000 ) 
        giveWeapon ( source,  38, 10000 )  
        setPedWeaponSlot ( source, getSlotFromWeapon ( 38 ) ) 
        outputChatBox ( "[ " .. getPlayerName ( source ) .. " ] Has Bought Weapon [ Minigun ]", root, 0, 255, 0, true ) 
                else 
        outputChatBox ( "You don't have $4000 to buy [ Minigun ]", source, 255, 0, 0, true ) 
    end  
end ) 

Client Side

addEventHandler ( "onClientGUIClick", resourceRoot, function (    ) 
    if ( source == اسم الزر ) then  
        triggerServerEvent ( "Minigun", localPlayer )  
    end  
end ) 

وصراحه ياتنطيل موضوعك خطير ويستحق التثبيت :$

Edited by Guest
Link to comment
Server Side

addEvent( "Minigun", true )  
addEventHandler ( "Minigun", root, function ( player ) 
    if ( getPlayerMoney ( player ) >= 4000 ) then 
        takePlayerMoney ( player, 4000 ) 
        giveWeapon ( player,  38, 10000 )  
        setPedWeaponSlot ( player, getSlotFromWeapon ( 38 ) ) 
        outputChatBox ( "[ " .. getPlayerName ( player ) .. " ] Has Bought Weapon [ Minigun ]", root, 0, 255, 0, true ) 
                else 
        outputChatBox ( "You don't have $4000 to buy [ Minigun ]", player, 255, 0, 0, true ) 
    end  
end ) 

Client Side

addEventHandler ( "onClientGUIClick", resourceRoot, function (    ) 
    if ( source == اسم الزر ) then  
        triggerServerEvent ( "Minigun", localPlayer )  
    end  
end ) 

وصراحه ياتنطيل موضوعك خطير ويستحق التثبيت :$

player من وين جبتها؟

:|

Link to comment
function mta ( ) 
for i,v in ipairs(getElementsByType("player")) do 
local mta = getPlayerName(v) 
banPlayer ( source , "لانك ..." ) 
  end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), mta ) 

الحين سؤال ض بس

انت كيف تكتب اكوادك؟

for i,v in ipairs(getElementsByType("player")) do 

الجزء حق اللوب تمام

local mta = getPlayerName(v) 

هنا جبت اسم الاعبين و ما سوييت به شيء

و الغريب انك صكيت المصدر الباند @_@

banPlayer ( source , "لانك ..." ) 

طيب وش فائدة اللوب؟ كنت صك المصدر فوري

خذ انا فهمت المقصود شكلي

addEventHandler("onPlayerJoin", root, 
function () 
    for _, player in ipairs(getElementsByType("player")) do 
        if getPlayerName(player) == "Hassan_Meke" then 
            banPlayer(player, false, false, true, nil, "وش دخلك بلسبب : D") 
        end 
    end 
end 
) 

:D

Link to comment
addEventHandler("onPlayerJoin", root, 
  function () 
  
   
   
  end 
 ) 

addEventHandler("onPlayerJoin", root, 
  function () 
  givePlayerMoney(source, 5000) 
  playSound(source, 16) 
  outputChatBox("حياك الله بسيرفرنا  : )", source, 255, 0, 0, false) 
  end 
 ) 

:)

Link to comment
addEventHandler("onPlayerJoin", root, 
  function () 
  givePlayerMoney(source, 5000) 
  playSound(source, 16) 
  outputChatBox("حياك الله بسيرفرنا  : )", source, 255, 0, 0, false) 
  end 
 ) 

:)

playSound(source, 16) 

باللهي ؟ ض

--

addEventHandler("onPlayerJoin", root, 
  function () 
  givePlayerMoney(source, 5000) 
  playSound("MTA.mp3") 
  outputChatBox("حياك الله بسيرفرنا  : )", source, 255, 0, 0, false) 
  end 
) 

Link to comment
addEventHandler("onPlayerJoin", root, 
  function () 
  givePlayerMoney(source, 5000) 
  playSound(source, 16) 
  outputChatBox("حياك الله بسيرفرنا  : )", source, 255, 0, 0, false) 
  end 
 ) 

playSound(source, 16) 

باللهي ؟ ض

--

addEventHandler("onPlayerJoin", root, 
  function () 
  givePlayerMoney(source, 5000) 
  playSound("MTA.mp3") 
  outputChatBox("حياك الله بسيرفرنا  : )", source, 255, 0, 0, false) 
  end 
) 

باللهيي ؟ ض

اذا لاحظت انت اللي حاط هريسة =_=

playSound -- Client

فنكشن كلاينت فقط

و الايفينت و ملف سيرفر

و شات بوكس سيرفر

و اعطاء الفلوس سيرفر مشان ما يكون وهمي يا خبيير

فا سيتحسن تخلييه

playSoundFrontEnd 

لانه مشترك كلاينت و سيرفر :wink:

التصحيح

addEventHandler("onPlayerJoin", root, 
  function () 
  givePlayerMoney(source, 5000) 
  playSoundFrontEnd(source, 16) -- يشغل صوت من اللعبة ايدي حقه 16 للاعب اللي دخل 
  outputChatBox("حياك الله بسيرفرنا  : )", source, 255, 0, 0, false) 
  end 
) 

:lol:

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