Jump to content

طلب


Recommended Posts

سسلام عليكم ورحمه الله وبراكته #

شباب كيفكم

سويت مود تملس ماركر توخد سياره

وكود سليم ..

وانا ابي لما يوخد سياره

يجي له رساله

لكن مو بل شات !

outputChatBox

--

ابي يجي بنص شاشه

مثل Gta:Sa

لما تختم اي مهمه ..

يقول

Win 500$

انا ابي هون يطلع

Car Spwan

  
local marker1 = createMarker (x,y,z,'cylinder',2,255,0,255,177 ) 
  
addEventHandler('onMarkerHit',marker1,function (plr) 
    if getElementType(plr) == 'player' and not isPedInVehicle(plr) then 
        if isElement(vehicle[plr]) then destroyElement(vehicle[plr]) vehicle[plr] = nil end 
            local x,y,z = getElementPosition(plr) 
                vehicle[plr] = createVehicle(id,x,y,z) 
                    warpPedIntoVehicle(plr,vehicle[plr]) 
                        outputChatBox('Welcome to your car',plr,255,0,255,true) 
        end 
    end 
) 
  
addEventHandler('onVehicleExplode',resourceRoot,function() 
    setTimer(destroyElement,2000,1,source) 
    end 
) 
    
addEventHandler('onPlayerQuit',root,function() 
    if isElement(vehicle[source]) then 
        destroyElement(vehicle[source]) 
            vehicle[source] = nil 
        end 
    end 
) 

Link to comment
addCommandHandler( "TextScreen", function( player,_, msg ) --- اضافة امر جديد بالكونسل 
 if ( msg and type( msg ) == "string" ) then --- نتحقق انه كتب المسج وانه المسج تساوي سترنق 
      triggerClientEvent ( player, "ShowMsg", player, tostring( msg ) )  --- نرسل تريقر لكلنت مع جلب المسج اللي كتبها 
     end 
end ) 

addEvent( "ShowMsg", true )  --- استقبال التريقر بـ اسمه 
addEventHandler( "ShowMsg", root, function( msg ) --- استقبال التريقر بـ اسمه ونعرف الرسالة اللي كتبها وارسلنها بالتريقر بالفنكشن هنا 
   if not ( isElement( Label ) ) then  ---- نتحقق من عدم وجود اللبل 
        Label = guiCreateLabel  ( 200, 200, 200, 200, msg, true ) --- نسوي اللبل بـ الرسالة اللي كتبها اللاعب 
  else  ---- لو كان اللبل موجود 
        destroyElement( Label )      --- نشيل اللبل 
       end 
end ) 
Link to comment

and تكون الزامي,

مثلا اذا كان معك فلوس وكنت داخل السياره...,

if getPlayerMoney() > 0 and isPedInVehicle(localPlayer) then 

هنا لازم يكون معك وانت داخل السياره , يعني مثلا لو معك 1000 وانت مو داخل السياره الوظيفه ما بتتحقق,

تستخدم اذا تبي تسوي شرط يتحقق او لا , مثلا اذا كان معك وفلوس او كنت داخل السياره , or بعكس

if getPlayerMoney() > 0 or isPedInVehicle(localPlayer) then 

هنا لو كانت معك فلوس يسوي الوظيفه , اما لو ما كان معك فلوس وكنت داخل السياره يسوي الوظيفه,

type بالنسبه لـ

تجيب لك نوع الشيء,

str = "Test" 
  
outputChatBox(type(str)) 
 -- string 
  
t = {} 
  
outputChatBox(type(t)) 
 -- table 
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...