Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function privateMessage(thePlayer, sendToName, ...) local message = table.concat({...}, "") if sendToName then if (getPlayerFromPartialName(sendToName)) then toPlayer = (getPlayerFromPartialName(sendToName)) if not(toPlayer == thePlayer) then if not message == "" then outputChatBox("PM to"..getPlayerName(toPlayer)..":"..message, thePlayer, 255, 255, 0) outputChatBox("PM from"..getPlayerName(thePlayer)..":"..message, toPlayer, 255, 255, 0) setElementData(thePlayer, "pmPartner", toPlayer) setElementData(toPlayer, "pmPartner", thePlayer) else outputChatBox("Syntax:/pm [part of name] [message]", thePlayer, 255, 0, 0) return false end else outputChatBox("You can't speak to your self.", thePlayer, 255, 0, 0) return false end else outputChatBox("Player not found.", thePlayer, 255, 0, 0) return false end else outputChatBox("Syntax: /pm [part of name] [message]", thePlayer, 255, 0, 0) return false end end addCommandHandler("pm", privateMessage) Now every name i put no find the player wtf
  2. still the same function privateMessage(thePlayer, _, sendToName, ...) local message = table.concat({...}, "") if id then target = getPlayerFromID(id) if target == false or target == nil then outputChatBox("That id has not conencted", player, 255, 0, 0) return end end if sendToName then if (getPlayerFromPartialName(sendToName)) then toPlayer = (getPlayerFromPartialName(sendToName)) if not(toPlayer == thePlayer) then if not message == "" then outputChatBox("PM to"..getPlayerName(toPlayer)..":"..message, thePlayer, 255, 255, 0) outputChatBox("PM from"..getPlayerName(thePlayer)..":"..message, toPlayer, 255, 255, 0) setElementData(thePlayer, "pmPartner", toPlayer) setElementData(toPlayer, "pmPartner", thePlayer) else outputChatBox("Syntax:/pm [part of name]/ [id] [message]", thePlayer, 255, 0, 0) return false end else outputChatBox("You can't speak to your self.", thePlayer, 255, 0, 0) return false end else outputChatBox("Player not found.", thePlayer, 255, 0, 0) return false end else outputChatBox("Syntax: /pm [part of name] /[id] [message]", thePlayer, 255, 0, 0) return false end end addCommandHandler("pm", privateMessage)
  3. function privateMessage(thePlayer, sendToName, id, ...) local message = table.concat({...}, "") if id then target = getPlayerFromID(id) if target == false or target == nil then outputChatBox("That id has not conencted", player, 255, 0, 0) return end end if sendToName then if (getPlayerFromPartialName(sendToName)) then toPlayer = (getPlayerFromPartialName(sendToName)) if not(toPlayer == thePlayer) then if not message == "" then outputChatBox("PM to"..getPlayerName(toPlayer)..":"..message, thePlayer, 255, 255, 0) outputChatBox("PM from"..getPlayerName(thePlayer)..":"..message, toPlayer, 255, 255, 0) setElementData(thePlayer, "pmPartner", toPlayer) setElementData(toPlayer, "pmPartner", thePlayer) else outputChatBox("Syntax:/pm [part of name]/ [id] [message]", thePlayer, 255, 0, 0) return false end else outputChatBox("You can't speak to your self.", thePlayer, 255, 0, 0) return false end else outputChatBox("Player not found.", thePlayer, 255, 0, 0) return false end else outputChatBox("Syntax: /pm [part of name] /[id] [message]", thePlayer, 255, 0, 0) return false end end addCommandHandler("pm", privateMessage) getPlayerFromPartialName take a nil value
  4. CLIENT-SIDE function spawnSystem() --- addEvent("openGUI", true) addEventHandler("openGUI", getRootElement(), spawnSystem) SERVER-SIDE function onDeath() triggerClientEvent(source, "openGUI", getRootElement()) takeAllWeapons (source) end addEventHandler("onPlayerWasted", getRootElement(), onDeath)
  5. addEvent("spawncar1",true) addEventHandler("spawncar1",getRootElement(), function() if not (isGuestAccount(getPlayerAccount(client))) then if not (isPedInVehicle(client)) then local x,y,z = getElementPosition(client) if (getElementData(client,"mycar1")) and (getElementData(client,"mycar1")~= nil) --[[and (getElementType(getElementData(client,"mycar1")) =="vehicle")]] then local vehicle = getElementData(client,"mycar1") destroyElement(vehicle) removeElementData(client,"mycar1") --local x,y,z = getElementPosition(vehicle) --setElementPosition(vehicle,x,y,z) outputChatBox("Vehicle destroyed",client) --[[ local vehicle = getElementData(client,"mybik1") destroyElement(vehicle) removeElementData(client,"mybik1") outputChatBox("Vehicle destroyed",client)]] elseif not (getElementData(client,"mycar1")) then local account = getPlayerAccount(client) local name = getAccountName(account) local playercar = executeSQLQuery("SELECT Model,Paintjob,Color,Upgrade0,Upgrade1,Upgrade2,Upgrade3,Upgrade4,Upgrade5,Upgrade6,Upgrade7,Upgrade8,Upgrade9,Upgrade10,Upgrade11,Upgrade12,Upgrade13,Upgrade14,Upgrade15,Upgrade16 FROM carslot1 WHERE PlayerName = ?",name) if (playercar) then if #playercar > 0 then local x,y,z = getElementPosition(client) local vehicle = createVehicle(playercar[1].Model,x + 5,y +2,z) setVehiclePaintjob(vehicle,playercar[1].Paintjob) setElementData(vehicle,"vehicleOwner","mycar1") setElementData (vehicle,"mycar1",getPlayerName(source)) setElementData (client, "mycar1", vehicle) setElementData(vehicle,"VOwner",getPlayerName(client)) outputChatBox ("Car spawned.", source, 255, 0, 0) addVehicleUpgrade(vehicle, playercar[1].Upgrade0) addVehicleUpgrade(vehicle, playercar[1].Upgrade1) addVehicleUpgrade(vehicle, playercar[1].Upgrade2) addVehicleUpgrade(vehicle, playercar[1].Upgrade3) addVehicleUpgrade(vehicle, playercar[1].Upgrade4) addVehicleUpgrade(vehicle, playercar[1].Upgrade5) addVehicleUpgrade(vehicle, playercar[1].Upgrade6) addVehicleUpgrade(vehicle, playercar[1].Upgrade7) addVehicleUpgrade(vehicle, playercar[1].Upgrade8) addVehicleUpgrade(vehicle, playercar[1].Upgrade9) addVehicleUpgrade(vehicle, playercar[1].Upgrade10) addVehicleUpgrade(vehicle, playercar[1].Upgrade11) addVehicleUpgrade(vehicle, playercar[1].Upgrade12) addVehicleUpgrade(vehicle, playercar[1].Upgrade13) addVehicleUpgrade(vehicle, playercar[1].Upgrade14) addVehicleUpgrade(vehicle, playercar[1].Upgrade15) addVehicleUpgrade(vehicle, playercar[1].Upgrade16) local col1 = gettok (playercar[1].Color, 1, string.byte(',') ) local col2 = gettok (playercar[1].Color, 2, string.byte(',') ) local col3 = gettok (playercar[1].Color, 3, string.byte(',') ) local col4 = gettok (playercar[1].Color, 4, string.byte(',') ) local col5 = gettok (playercar[1].Color, 5, string.byte(',') ) local col6 = gettok (playercar[1].Color, 6, string.byte(',') ) getVehicleUpgradeOnSlot(vehicle, 0) getVehicleUpgradeOnSlot(vehicle, 1) getVehicleUpgradeOnSlot(vehicle, 2) getVehicleUpgradeOnSlot(vehicle, 3) getVehicleUpgradeOnSlot(vehicle, 4) getVehicleUpgradeOnSlot(vehicle, 5) getVehicleUpgradeOnSlot(vehicle, 6) getVehicleUpgradeOnSlot(vehicle, 7) getVehicleUpgradeOnSlot(vehicle, 8) getVehicleUpgradeOnSlot(vehicle, 10) getVehicleUpgradeOnSlot(vehicle, 11) getVehicleUpgradeOnSlot(vehicle, 12) getVehicleUpgradeOnSlot(vehicle,13) getVehicleUpgradeOnSlot(vehicle, 14) getVehicleUpgradeOnSlot(vehicle, 15) getVehicleUpgradeOnSlot(vehicle, 16) outputChatBox(col1) if col1 then setVehicleColor(vehicle, tonumber(col1), tonumber(col2), tonumber(col3), tonumber(col4), tonumber(col5), tonumber(col6)) end else outputChatBox("No has comprado un vehículo en esta ranura.",client) end end end else outputChatBox("Primero sal del coche",client) end else outputChatBox("¡Loguéate!",client) end end)
  6. Dimos7

    Help GUI!

    you have use fadeCamera ?
  7. db = dbConnect("msql", "dbname=" ..tostring(get("DATABASE_NAME"))"127.0.0.1", "port =" .. tostring(get("MYSQL_PORT"))""; unix_socket=/opt/lampp/var/mysql/mysql.sock, ..tostring(get("MSQL_USER"))"", ..tostring(get("MYSQL_PASS")).." "," share=1;autoreconnect=1")
  8. Dimos7

    Help!

    teamplayer = createTeam(jugadores, 255, 255, 255) function jugadores(thePlayer) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Anarquia")) or not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Alianza")) then setPlayerTeam(thePlayer, teamplayer) end end addEventHandler("onPlayerJoin", root, jugadores)
  9. Dimos7

    Help!

    teamplayer = createTeam(jugadores, 255, 255, 255) function jugadores(thePlayer) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Anarquia")) or not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Alinaza")) then setPlayerTeam(source, teamplayer) end end addEventHandler("onResourceStart", root, jugadores)
  10. Dimos7

    Help!

    teamplayer = createTeam(jugadores, 255, 255, 255) function jugadores(thePlayer) local account = getPlayerAccount(thePlayer) local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("Anarguia")) or not isObjectInACLGroup("user."..accountName, aclGetGroup("Alianza")) then setPlayerTeam(thePlayer, teamplayer) end end addEventHandler("onResourceStart", root, jugadores)
  11. addEventHandler("onPlayerDamage", root, function(attacker, weapon) if weapon == 8 and getElementType(source) == "ped" then if (getElementData(source, "zombie") then killPed(source, attacker, weapon) end end end )
  12. in password put the password you have with "" and in database the name of database with = "" database = mysql_connect("127.0.0.1", "root", password, database) function saveDrifts() local serial = getPlayerSerial(source) local anterior = getElementData(source, "Last Drift") local total = getElementData(source, "Total Drift") local mejor = getElementData(source, "Best Drift") local q = mysql_query(database, "SELECT * FROM `accounts` WHERE `serial`= ' "..serial.." ' ") if (mysql_num_row(q) == 0) then mysql_query(database, "INSERT INTO accounts(`serial`, anterior, total, mejor VALUES (' "..serial.." ', " ..anterior..", "..total..", "..mejor..")") else mysql_query(database, "UPDATE `accounts` SET anterior = "..anterior..", total = " ..total..", mejor = " ..mejor.." WHERE `serial` = ' " ..serial.. " ' ") end end function loadDrifts() local serial = getPlayerSerial(source) local result = mysql_query(database, "SELECT * FROM `accounts` WHERE `serial` = ' "..serial.." ' ") if result then while true do local row = mysql_fetch_assoc(result) if not row then break end setElementData(source, "Last Drift", anterior) setElementData(source, " Total Drift", total) setElementData(source, "Best Drift", mejor) end end end addEventHandler("onPlayerJoin", root, loadDrifts) addEventHandler("onPlayerQuit", root, saveDrifts)
  13. Dimos7

    GUI Problem

    GUIEditor = { button = {}, window = {}, edit = {}, label = {} } function openGUI() GUIEditor.window[1] = guiCreateWindow(315, 125, 763, 472, "Stock Market", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 28, 202, 32, "LCN Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(11, 66, 134, 21, "Company Names", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.label[3] = guiCreateLabel(155, 66, 109, 17, "Information", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(11, 87, 57, 20, "Binco", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(157, 88, 543, 21, "Sells various clothes to the people of San Andreas. Progress Rate: 10.11, Loss Rate: 5.43", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(9, 400, 93, 40, "Invest For Binco", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(19, 444, 73, 18, "", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(10, 109, 94, 19, "AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(156, 109, 544, 19, "Life Insurance company. Progress Rate 60.2, Loss Rate: 40.7", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(112, 400, 106, 40, "Invest For AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(126, 444, 82, 18, "", false, GUIEditor.window[1]) GUIEditor.label[8] = guiCreateLabel(10, 130, 96, 15, "AirEmu", false, GUIEditor.window[1]) GUIEditor.label[9] = guiCreateLabel(155, 130, 545, 18, "Makes cargo and passenger planes. Progress Rate: 11.7, Loss Rate: 5.64", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(228, 400, 110, 40, "Invest For AirEmu", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(244, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[10] = guiCreateLabel(11, 153, 93, 15, "FlyUS", false, GUIEditor.window[1]) GUIEditor.label[11] = guiCreateLabel(154, 153, 546, 15, "Makes cargo and passenger planes. Progress Rate: 17.2, Loss Rate: 10.29", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(348, 400, 104, 40, "Invest For FlyUS", false, GUIEditor.window[1]) GUIEditor.edit[4] = guiCreateEdit(358, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[12] = guiCreateLabel(10, 175, 112, 15, "Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.label[13] = guiCreateLabel(154, 175, 547, 18, "Tuning shops all over Los Santos. Progress Rate: 2.76, Loss Rate: 8.90", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(461, 402, 103, 38, "Invest For Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.edit[5] = guiCreateEdit(471, 444, 83, 19, "", false, GUIEditor.window[1]) GUIEditor.label[14] = guiCreateLabel(573, 406, 176, 28, "Liberty City National", false, GUIEditor.window[1]) local font0_ChineseText = guiCreateFont(":guieditor/fonts/ChineseText.ttf", 16) guiSetFont(GUIEditor.label[14], font0_ChineseText) guiLabelSetColor(GUIEditor.label[14], 0, 159, 3) GUIEditor.label[15] = guiCreateLabel(621, 430, 79, 29, "Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[15], font0_ChineseText) guiLabelSetColor(GUIEditor.label[15], 0, 159, 3) GUIEditor.button[6] = guiCreateButton(710, 26,38, 28, "X", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) end function closeGui() if (source == GUIEditor.button[6]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end if (source == GUIEditor.button[1]) then local a = guiGetText(GUIEditor.edit[1]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(a) else return outputChatBox("You must invest more than $100 or you don't have enough money!", 255, 0, 0) end end if (source == GUIEditor.button[2]) then local b = guiGetText(GUIEditor.edit[2]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(b) end end if (source == GUIEditor.button[3]) then local c = guiGetText(GUIEditor.edit[3]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(c) end end if (source == GUIEditor.button[4]) then local d = guiGetText(GUIEditor.edit[4]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(d) end end if (source == GUIEditor.button[5]) then local e = guiGetText(GUIEditor.edit[5]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(e) end end end addEventHandler("onClientGUIClick", getRootElement(), closeGui) function Draw() openGUI() dxDrawRectangle(323, 186, 746, 333, tocolor(0, 0, 0, 255), false) dxDrawLine(467, 188, 467, 517, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 208, 1067, 208, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(323, 230, 1068, 231, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 252, 1066, 252, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 274, 1067, 274, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 296, 1066, 297, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 317, 1064, 317, tocolor(255, 255, 255, 255), 1, false) guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addCommandHandler("stockexchange", Draw) addEventHandler("onClientRender", root, Draw)
  14. function one() guiSetText(oneMinute, "Damage On") setTimer(two, 1000, 1) cancelEvent() addEventHandler("onClientPlayerDamage", root, one) end function two() guiSetText(oneMinute, "Damage Off") setTimer(one, 1000, 1) removeEventHandler("onClientPlayerDamage", root, one) end
  15. Dimos7

    GUI Problem

    GUIEditor = { button = {}, window = {}, edit = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(315, 125, 763, 472, "Stock Market", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 28, 202, 32, "LCN Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(11, 66, 134, 21, "Company Names", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.label[3] = guiCreateLabel(155, 66, 109, 17, "Information", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(11, 87, 57, 20, "Binco", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(157, 88, 543, 21, "Sells various clothes to the people of San Andreas. Progress Rate: 10.11, Loss Rate: 5.43", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(9, 400, 93, 40, "Invest For Binco", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(19, 444, 73, 18, "", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(10, 109, 94, 19, "AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(156, 109, 544, 19, "Life Insurance company. Progress Rate 60.2, Loss Rate: 40.7", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(112, 400, 106, 40, "Invest For AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(126, 444, 82, 18, "", false, GUIEditor.window[1]) GUIEditor.label[8] = guiCreateLabel(10, 130, 96, 15, "AirEmu", false, GUIEditor.window[1]) GUIEditor.label[9] = guiCreateLabel(155, 130, 545, 18, "Makes cargo and passenger planes. Progress Rate: 11.7, Loss Rate: 5.64", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(228, 400, 110, 40, "Invest For AirEmu", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(244, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[10] = guiCreateLabel(11, 153, 93, 15, "FlyUS", false, GUIEditor.window[1]) GUIEditor.label[11] = guiCreateLabel(154, 153, 546, 15, "Makes cargo and passenger planes. Progress Rate: 17.2, Loss Rate: 10.29", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(348, 400, 104, 40, "Invest For FlyUS", false, GUIEditor.window[1]) GUIEditor.edit[4] = guiCreateEdit(358, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[12] = guiCreateLabel(10, 175, 112, 15, "Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.label[13] = guiCreateLabel(154, 175, 547, 18, "Tuning shops all over Los Santos. Progress Rate: 2.76, Loss Rate: 8.90", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(461, 402, 103, 38, "Invest For Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.edit[5] = guiCreateEdit(471, 444, 83, 19, "", false, GUIEditor.window[1]) GUIEditor.label[14] = guiCreateLabel(573, 406, 176, 28, "Liberty City National", false, GUIEditor.window[1]) local font0_ChineseText = guiCreateFont(":guieditor/fonts/ChineseText.ttf", 16) guiSetFont(GUIEditor.label[14], font0_ChineseText) guiLabelSetColor(GUIEditor.label[14], 0, 159, 3) GUIEditor.label[15] = guiCreateLabel(621, 430, 79, 29, "Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[15], font0_ChineseText) guiLabelSetColor(GUIEditor.label[15], 0, 159, 3) GUIEditor.button[6] = guiCreateButton(710, 26,38, 28, "X", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) end ) function closeGui() if (source == GUIEditor.button[6]) then guiSetVisible(GUIEditor.window[1], false) end if (source == GUIEditor.button[1]) then local a = guiGetText(GUIEditor.edit[1]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, tonumber(a)) else return outputChatBox("You must invest more than $100 or you don't have enough money!", 255, 0, 0) end end if (source == GUIEditor.button[2]) then local b = guiGetText(GUIEditor.edit[2]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, b) end end if (source == GUIEditor.button[3]) then local c = guiGetText(GUIEditor.edit[3]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, c) end end if (source == GUIEditor.button[4]) then local d = guiGetText(GUIEditor.edit[4]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, d) end end if (source == GUIEditor.button[5]) then local e = guiGetText(GUIEditor.edit[5]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, e) end end end addEventHandler("onClientGUIClick", getRootElement(), closeGui) function Draw() dxDrawRectangle(323, 186, 746, 333, tocolor(0, 0, 0, 255), false) dxDrawLine(467, 188, 467, 517, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 208, 1067, 208, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(323, 230, 1068, 231, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 252, 1066, 252, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 274, 1067, 274, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 296, 1066, 297, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 317, 1064, 317, tocolor(255, 255, 255, 255), 1, false) guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addCommandHandler("stockexchange", Draw) addEventHandler("onClientRender", root, Draw)
  16. function one() guiSetText(oneMinute, "Damage On") setTimer(two, 1000, 1) cancelEvent() end addEventHandler("onClientPlayerDamage", root, one) function two() guiSetText(oneMinute, "Damage Off") setTimer(one, 1000, 1) cancelEvent() end removeEventHandler("onClientPlayerDamage", root, two)
  17. function Invisible(thePlayer) if (getElementModel(thePlayer) == 179) then local n = (getElementAlpha(thePlayer) > 0) and 0 or 255; setElementAlpha(thePlayer, n); end end addCommandHandler("invisible", Invisible) addEventHandler("onWeaponFire", root, function() setElementAlpha(source, 255) end )
  18. local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)) attachElements(gate, garage)
  19. want both gate be together without gap and degress?
  20. Dimos7

    quetion

    i think its same for both but not 100 precent
  21. Dimos7

    quetion

    When create the marker will be able all players see it that i know
  22. Dimos7

    quetion

    Marker alhpa its that make it visible or invisible to player 0 its invisible and 255 its visible
×
×
  • Create New...