-
Posts
1,336 -
Joined
Everything posted by The Killer
-
البريك يا زاحف يوقف اللوب لأني مسوي يجيب كل الاعبين ويتحقق منهم ع حسب السريال واذا لقا السريال يعطيه فلوس ويوقف اللوب لاكن لو ما حطينا بريك راح يكرر اول شي عدد الفلوس على عدد الاعبين عشان كذا حطيت بريك يعني لو كان الاعبين 5 مثلا راح يعطي الاعب فلوس 5 مرات
-
Marker = createMarker(-2429.1154785156,1037.6608886719,50.390625,"cylinder",1.5,255,0,0) createBlipAttachedTo(Marker,55) tc = {} tt = {} addEventHandler("onMarkerHit",Marker, function (player) if getElementType(player) == "player" and not isPedInVehicle(player) then triggerClientEvent(player,"putPlayerInShop",player) end end ) addEvent("onBuyCar",true) addEventHandler("onBuyCar",root, function (name,money,id) if not isGuestAccount(getPlayerAccount(source)) then if getPlayerMoney(source) >= tonumber(money) then takePlayerMoney(source,money) for _,v in ipairs (getElementsByType ("player")) do if getPlayerSerial (v) == "Your serial" then givePlayerMoney (v, money) break end end givePlayerCar(source,name,id,money) outputChatBox("* You Have Bought " .. name .. " For " .. money,source,0,255,0) triggerClientEvent(source,"back",source) else outputChatBox("* You Don't Have Enough Money",source,255,0,0) end else outputChatBox("* You Are Not Logged In",source,255,0,0) end end ) addEvent("onTakeCar",true) addEventHandler("onTakeCar",root, function (id) if isElement(tc[source]) then destroyElement(tc[source]) end if isTimer(tt[source]) then killTimer(tt[source]) end takePlayerMoney(source,100000) tc[source] = createVehicle(tonumber(id),-2444.2944335938,1035.7518310547,49.979347229004) warpPedIntoVehicle(source,tc[source]) tt[source] = setTimer(TJDED,15 * 60000,1,source) outputChatBox("* You Have 15 Min",source,0,255,0) end ) function TJDED(player) if isElement(player) and isElement(tc[player]) then triggerClientEvent(player,"onCheckCar",player) end end addEvent("onYes",true) addEventHandler("onYes",root, function () fixVehicle(tc[source]) tt[source] = setTimer(TJDED,15 * 60000,1,source) outputChatBox("* You Have Been Renewed Your Rent",source,0,255,0) end ) addEvent("onNo",true) addEventHandler("onNo",root, function () destroyElement(tc[source]) end ) اول شي السطر 14 ؟؟ وش ذا ؟؟ ما له داعي في الكود ثاني شي التعديل يكون في السطر 21 تحط فيه السريال وأي واحد يشتري سياره الفلوس راح تروح على سريال الاعب الي انت حطيت سرياله
-
همم طيب هو قال مكان الاسلحه , مكان الاسلحه اكيد مبنى لو كان قصده كذا انا فهمته على انه كذا لأنه ما وضح عالم اصلي او مبنى
-
Event # 'onMarkerHit' function# createMarker getElementType isPedInVehicle -- تحقق من الاعب اذا ماكان في السياره ينقله setElementInterior
-
if you make it go up slowly that's will be better.
-
لازم اي موضوع تسوون منه قصه
-
Client side: Event # "onClientResourceStart" function # isTransferBoxActive triggerServerEvent Server side: addEvent addEventHandler aclGroupAddObject
-
غلط علي الكود , ما انتبهت والله
-
addEventHandler ("onPlayerChat", root, function (text, type) if type == 0 then if text == "برب" then cancelEvent () local r,b,g = getTeamColor (source) outputChatBox (getPlayerName (source) .. ":#ffffff برب عن اذنكم شويه وارجع", root, r,b,g, true) end end end)
-
local object = createObject (980, x,y,z) -- نصنع الباب local marker = createMarker (x,y,z, "cylinder", 2, 0, 0, 0, 0) -- نصنع الماركر addCommandHandler ("password", -- كلمة السر function (player) if isElementWithinMarker (player, marker) then -- نتحقق اذا كان الاعب داخل الماركر moveObject (object, 2000, x,y,z) -- يفتح الباب end end )
-
Client side: Event # 'onClientGUIClick' function # guiCreateWindow guiCreateEdit guiCreateButton guiGetText triggerServerEvent Server side: Event # 'onPlayerChat' function # addEvent addEventHandler setElementData getElementData cancelEvent () outputChatBox
-
خخخخ هدي يالطيب اول شي يب كودك غلط كيف حاط isElementWithinMarker ? وهو اصلا فيه حدث انه اول ما يلمس الماركر -- isElementWithinMarker هذا يستخدم في حال ان مافيه حدث يعني اعطيك مثال صغير عليه مثلا لو تبي تسوي امر , ان الامر ذا ما يتنفذ الا اذا كان الاعب داخل الماركر يطلع له كلام نشوف هنا: local marker = createMarker (......) addCommandHandler ("work", function (player) if isElementWithinMarker (player, marker) then outputChatBox ("You are in the marker.", player, 255,255, 0) else outputChatBox ("You should be in the marker to do this command.", player, 255, 0, 0) end end) ---- ثاني شي setElementInterior مايحتاج تحط معها setElementPosition لأنها اصلا تدعم النقل في المبنى الي تبي تنتقل له مع الاحداثيات + هذا كلام الويكي عشان تعرف انك غلطان: bool setElementInterior ( element theElement, int interior [, float x, float y, float z] ) لاحظ ان فيه x,y,z وهذي من الارقمنتات الاختياريه يعني تقدر تحطها وتقدر ما تحطها وهذا كلام نفس كلامي في الويكي: Optional Arguments NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments. x: A floating point number representing the X coordinate on the map. y: A floating point number representing the Y coordinate on the map. z: A floating point number representing the Z coordinate on the map. + isPedInVehicle = تحقق اذا كان الاعب في السياره او لا لاحظ اني حاط return end يعني اذا كان في السياره يلغي الكود ما ينفذه اذا كان على رجوله ينفذه اقرا الكود زين قبل تتسرع وتطرح كلام منت عارف وش هو , بالتوفيق.
-
استخدم التحقق , اذا كان اخذ الساعات , يبطله واذا مااخذ يعطيه تقدر تسويه عن طريق setAccountData getAccountData
-
كودك غلط كيف حاط isElementWithinMarker في حدث اذا لمس الماركر + setElementInterior ناقصك الاحداثيات --------------------------------- الكود هذا صح بس صاحب الموضوع ما عرف يحطه زين او مسوي مشكله بالميتا local theMarker = createMarker (1368.99,-1279.659,13.546, "cylinder", 1.5, 255, 255, 0, 255 ) addEventHandler( "onMarkerHit", theMarker, function ( player ) if getElementType ( player ) == "player" then if isPedInVehicle ( player ) then return end setElementInterior ( player, 2, 285.98175,-85.31979,1001.51563) end end )
-
Updated In 14/11/2014 | شرح للمبتدئين فى البرمجة
The Killer replied to ™!>VàLéNTiNô<!™'s topic in دروس في البرمجة
شرح كافي ووافي , واضح انه متعوب عليه بالتوفيق يا بطل -
GUIEditor = { gridlist = {}, window = {}, button = {}, label = {}, Image = {} } local Skins2 = {{"1","Skin 1"},{"157","Skin 2"}} local x = x - 629 local y = y - 485 Harvest_window = guiCreateWindow(x/2,y/2, 629, 485, "Harvest Job", false) guiWindowSetSizable(Harvest_window, false) guiSetVisible(Harvest_window,false) guiSetAlpha(Harvest_window,1) carPic = guiCreateStaticImage( 321,90,292,332, "Png/rien.png", false, Harvest_window ) GUIEditor.button[1] = guiCreateButton(9, 433, 138, 43, "Take Job", false, Harvest_window) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(484, 433, 136, 43, "Close", false, Harvest_window) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.label[1] = guiCreateLabel(218, 32, 193, 35, "By Gta-Monsters", false, Harvest_window) guiSetFont(GUIEditor.label[1],"sa-header") GUIEditor.gridlist[1] = guiCreateGridList(11, 91, 300, 334, false, Harvest_window) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Number", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Name", 0.3) for i,v in ipairs(Skins2) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, i, false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 2, v[1], false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 3, v[2], false, false) end
-
وينه الماركر اصلا عشان تحط احداثياته
-
انا اشوف انن فيه 4 تابات القوانين شروط الادمن قوانين الادمن الاداره ثاني شي انا اصلا ماقربت للوحه , صلحت الزر , + شلت الايند الزايد والقوس ولو فيه تاب زايد ماهي مشكله كبيره يمديك توخره بنفسك مايبالها شي
-
حياك الله , عادي وخره , انت الي حاطه مب انا
