Jump to content

HustraDev

Members
  • Posts

    139
  • Joined

  • Last visited

Everything posted by HustraDev

  1. ok i download the update and install it but dose'n work i'm running the server in www.delux-host.com
  2. Hello all, I'm Running a 1.3.5 server in Delux host and when i inter the server works 100% but when Other Players inter after finish the download mtasa crash and shows desktop
  3. مسويه على إستضافة ديلوكس كيف أحدث السيرفر دخلت على هذا الرابط mtasa.com/3213 وحملة التحديث حق 1.3 طيب بعدها وش اسوي
  4. السلام عليكم ورحمة الله وباركته شباب عندي مشكلة في سيرفر مشغله على اصدار 1.3 لما ادخل له يدخلني عادي مافي مشكلة بس لما يدخل احد غيري يسوي له كراش ويرجع لسطح المكتب جربت اشغله على اصدار 1.4 ونفسه ماإنحلت المشكلة أرجو المساعدة مشكورين
  5. Hello All, I Made A Car Shop The Idea About it When I Buy a Car from the Main Window the Car Add for A Table And set As data and Shows in grid list so i need some one to repair this code and Shows the bought cars in grid list client side : Tables : cars = { ---- table of the cars { 517,'camry',1999 }, { 331,'Car Name 2',299 }, { 333,'Car Name 3',399 }, { 404,'Car Name 4',499 }, { 413,'Car Name 5',599 }, { 411,'Car Name 6',999 }, } pcars = { ---- Table of the Bought cars } for k,v in ipairs ( pcars ) do local row = guiGridListAddRow (spcar) guiGridListSetItemText (spcar, row, 1,v [1] , false, false) guiGridListSetItemText (spcar, row, 2, v [2], false, false) end for k,v in ipairs ( cars ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1,v [1] , false, false) guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, v [2], false, false) guiGridListSetItemText (GUIEditor.gridlist[1], row, 3, v [3] , false, false) end function buycar() if (source == GUIEditor.button[2]) then if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) then local carID = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1) local carName = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 2) local carPrice = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 3) triggerServerEvent ("createcar", getLocalPlayer(), carID, carName, carPrice) end end end addEventHandler ("onClientGUIClick", getRootElement(), buycar) ----- addEvent ( "table", true ) addEventHandler ( "table", root, function ( carID, carName ) if ( not pcars ) then pcars = { } end table.insert ( pcars, { carID, carName } ) end ) function spawn() if (source == spawncar) then if (guiGridListGetSelectedItem (spcar)) then local carID = guiGridListGetItemText (spcar, guiGridListGetSelectedItem (spcar), 1) local carName = guiGridListGetItemText (spcar, guiGridListGetSelectedItem (spcar), 2) triggerServerEvent ("spawnpla", getLocalPlayer(), carID, carName) end end end addEventHandler ("onClientGUIClick", getRootElement(), spawn) ----- addEvent ("createcar", true) addEventHandler ("createcar", getRootElement(), function(CarID, carName, carPrice) --- if (getPlayerMoney (source) >= tonumber(carPrice)) then outputChatBox ("Bought a " .. carName, source, 255, 0, 0, false) outputChatBox ("ID: " .. CarID, source, 255, 0, 0, false) outputChatBox ("Cost: " .. carPrice, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (carPrice)) setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(CarID)) setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3) setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0) triggerClientEvent( source, 'table', source , CarID, carName) else outputChatBox ("msg", source, 255, 0, 0, false) end end ) addEvent ("spawnpla", true) addEventHandler ("spawnpla", root, function (CarID,CarName) if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then setElementVelocity (getElementData (source, "hisCar"), 0,0,0) local x,y,z = getElementPosition (source) setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0) setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1) outputChatBox ("Car spawned.", source, 255, 0, 0) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then CarID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (CarID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("carsspwaned.", source, 255, 0, 0) end end end end ) sorry for bad english I hope you understand me Thanks ,
  6. i try it but nothing shows in gridlist
  7. Hello All, i have been scripting a car show with a grid list spawner for the bought cars but when i use insert.table to insert values to spawn gridlist i Failed typing the code so i need some help right here code Server : addEvent ("createcar", true) addEventHandler ("createcar", getRootElement(), function(carID, carName, carPrice) --- if (getPlayerMoney (source) >= tonumber(carPrice)) then outputChatBox ("Bought a " .. carName, source, 255, 0, 0, false) outputChatBox ("ID: " .. carID, source, 255, 0, 0, false) outputChatBox ("Cost: " .. carPrice, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (carPrice)) local x, y, z = getElementPosition ( source ) createVehicle ( carID, x, y + 5, z ) triggerClientEvent( source, 'table', source , carID, carName) else outputChatBox ("no money", source, 255, 0, 0, false) end end) Client : addEvent ( 'table', true) addEventHandler( 'table', localPlayer, function(carID, carName) table.insert(pcars,carID,carName) end ) Thanks
  8. Hello All, i have some question i made new script and i need create a table with this values { ID,name,price } and show it in GUI gridlist i have written code But it does not work GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(374, 208, 541, 361, "CarShow", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.gridlist[1] = guiCreateGridList(9, 24, 522, 242, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "ID", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.3) GUIEditor.button[1] = guiCreateButton(11, 295, 200, 56, "X", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-header") GUIEditor.button[2] = guiCreateButton(217, 295, 314, 56, "use", false, GUIEditor.window[1]) end ) cars = {{402,'',price},{331,'',price},{333,'',price},{404,'',price},{413,'carname',price}} --- { ID,name,price } for i,v in pairs (cars) do local carName = (v[2]) local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, carName, false, true) guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, tostring(v[2]), false, true) guiGridListSetItemText (GUIEditor.gridlist[1], row, 3, tostring(v[3]), false, true) end
  9. Thanks Man Finally i Get it
  10. ملف تنفيدي والاغلب انه يكون برنامج ملغم
  11. ok but How to Create The database file the function you give it to me Create TABLE and colname and How to add colname to gridlist in GUI and Thanks So fast reply
  12. Hello World, i think the most Database Language Used in Script's The SQLite So i'm Thinking to use it in New Script ShowCar , with Spawn And Destroy So i need some function and Event's To use it Can anyone give it to me ? Thanks ~
  13. Hey Guy's I have Problem in code i use to Give Money for player's in group every 1 hour But it does not work setTimer(function(tPlayer) if getElementData(tPlayer,'Group') == 'Army' then setPlayerMoney(tPlayer, 4000) --- money Army end end, 60000, 1, source)
  14. Hi Guy's i have problem in 1.4 i am running server in 1.4 ver When theCar's hit the wall the mtasa client stop and show desktop even when I use Weapons on player the mtasa stop and crash and show the desktop so Please Helpppppp
  15. restart: Resource could not be found
  16. "admin" startup="1" protected="0" /> "defaultstats" startup="1" protected="0" /> "helpmanager" startup="1" protected="0" /> "joinquit" startup="1" protected="0" /> "mapcycler" startup="1" protected="0" /> "mapmanager" startup="1" protected="0" /> "parachute" startup="1" protected="0" /> "resourcebrowser" startup="1" protected="1" default="true" /> "resourcemanager" startup="1" protected="1" /> "scoreboard" startup="1" protected="0" /> "spawnmanager" startup="1" protected="0" /> "voice" startup="1" protected="0" /> "votemanager" startup="1" protected="0" /> "webadmin" startup="1" protected="0" /> "login" startup="1" protected="0" />
  17. same Problem can you Give me ACL with this Right's
×
×
  • Create New...