Jump to content

Michcio

Members
  • Posts

    84
  • Joined

  • Last visited

Details

  • Location
    Poland

Michcio's Achievements

Transformer

Transformer (11/54)

0

Reputation

  1. Witam. Mam do sprzedania kompletny serwer Truck, czyli: >logowanie >system postaci >system bramek ViaToll >system paliwa (z tankowaniem stacji) >system towarów >restauracje >system domów >system aut prywatnych >monitoring serwera podpinany pod IPB >panele szefów firm >i wiele więcej... Screeny: https://imageshack.com/a/gNnq/1 Oczywiście udzielę pomocy we wgraniu wszystkiego na serwer oraz w ewentualnej edycji skryptów. Więcej informacji pod numerem gadu-gadu: 22508099.
  2. Everything okey on relative numbers. Ty!
  3. Problem is here: local car = getPedOccupiedVehicle( target )
  4. Michcio

    easy help

    function cham(thePlayer, cmdName) local Vehicle = getPedOccupiedVehicle(thePlayer) if isPedInVehicle(thePlayer) then local r = math.random(0,255) local g = math.random(0,255) local b = math.random(0,255) outputChatBox(tostring(r)..","..tostring(g)..","..tostring(b)) end end addCommandHandler("cham", cham) EDITED I think you want to choose random color ids?
  5. Doesn't work. Problem is not in speed. function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.61 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end local scx,scy = guiGetScreenSize() function suszara () local target = getPedTarget(getLocalPlayer()) local px,py,pz=getElementPosition(getLocalPlayer()) if getPlayerTeam(getLocalPlayer()) == getTeamFromName("Policja") then if target and getElementType(target) == "player" then if target ~= getLocalPlayer() then local x,y,z = getElementPosition(target) local car = getPedOccupiedVehicle( target ) if car then local speed = getElementSpeed(car,"kph") if speed then if getVehicleController(car) == target then local dystans=getDistanceBetweenPoints3D(x,y,z,px,py,pz) local cx,cy,cz = getCameraMatrix() if dystans <= 60 then if isLineOfSightClear(cx,cy,cz,px,py,pz,true,false,false,true,false,false,false,getPedOccupiedVehicle(getLocalPlayer())) then outputChatBox(speed) dxDrawText(getPlayerName(getVehicleController(car)).." : "..speed.." km/h", scx*(213/1280), scy*(842/1024), scx*(977/1280), scy*(913/1024), tocolor(255, 255, 255, 255), 1, "bankgothic", "center", "center", false, false, true, false, false) end end end end end end end end end addEventHandler("onClientRender",getRootElement(),suszara)
  6. My script doesn't work. I can't find mistake in it. local scx,scy = guiGetScreenSize() function suszara () local target = getPedTarget(getLocalPlayer()) local px,py,pz=getElementPosition(getLocalPlayer()) if getPlayerTeam(getLocalPlayer()) == getTeamFromName("Policja") then if target and getElementType(target) == "player" then if target ~= getLocalPlayer() then local x,y,z = getElementPosition(target) local car = getPedOccupiedVehicle( target ) if car then local speed = math.floor(getDistanceBetweenPoints3D(0,0,0,getElementVelocity(car)) * 100 * 1.61) if speed then if getVehicleController(car) == target then local dystans=getDistanceBetweenPoints3D(x,y,z,px,py,pz) local cx,cy,cz = getCameraMatrix() if dystans <= 60 then if isLineOfSightClear(cx,cy,cz,px,py,pz,true,false,false,true,false,false,false,getPedOccupiedVehicle(getLocalPlayer())) then dxDrawText(getPlayerName(getVehicleController(car)).." : "..speed.." km/h", scx*(213/1280), scy*(842/1024), scx*(977/1280), scy*(913/1024), tocolor(255, 255, 255, 255), 1, "bankgothic", "center", "center", false, false, true, false, false) end end end end end end end end end addEventHandler("onClientRender",getRootElement(),suszara)
  7. Oh i found mistake. The mistake is 'int'. Topic closed.
  8. Sorry for spam but I don't know that it will create so much topics. Edit: The problem solved, but I have another problem with MySQL and I don't know why. Debug outputs: [2013-02-15 14:42:16] INFO: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int, dim, wlasciciel, nick, cena, bank, czynsz, ilnaj, koszt) VALUES ('-2665.070' at line 1 local insertid,e = exports.sql:query_insertid( "INSERT INTO domy ( x, y, z, ix, iy, iz, int, dim, wlasciciel, nick, cena, bank, czynsz, ilnaj, koszt) VALUES (" .. table.concat( { "'"..tonumber(x).."'", "'"..tonumber(y).."'", "'"..tonumber(z).."'", "'"..tonumber(ix).."'", "'"..tonumber(iy).."'", "'"..tonumber(iz).."'", "'"..tonumber(int).."'", 0, "'"..tonumber(wlasciciel).."'", "'"..nick.."'", "'"..tonumber(cena).."'", "'"..tonumber(bank).."'", 0, 0, 0 }, ", " ) .. ")" )
  9. Theres no data in columns 2 - 5. local wnetrza = { -- I don't really use tables [1] = "223.0538482666, 1287.3552246094, 1082.140625, 1, Shitty house 1", [2] = "2233.6594238281, -1114.9837646484, 1050.8828125, 5, Hotel room 1", [3] = "2365.22265625, -1135.5612792969, 1050.8825683594, 8, Modern house 1", [4] = "2282.9401855469, -1140.1246337891, 1050.8984375, 11, Hotel room 2", [5] = "2196.7075195313, -1204.3569335938, 1049.0234375, 6, Modern house 2", [6] = "2270.0834960938, -1210.4854736328, 1047.5625, 10, Modern house 3", [7] = "2308.755859375, -1212.5498046875, 1049.0234375, 6, Shitty house 2", [8] = "2217.7729492188, -1076.2110595703, 1050.484375, 1, Hotel room 3", [9] = "2237.5009765625, -1080.9367675781, 1049.0234375, 2, Good house 1", [10] = "2317.7609863281, -1026.4268798828, 1050.2177734375, 9, Good Stair house 1", [11] = "261.05038452148, 1284.7646484375, 1080.2578125, 4, Goood house 2", [12] = "140.18000793457, 1366.7183837891, 1083.859375, 5, Modern house 4(Rich)", [13] = "83.037002563477, 1322.6156005859, 1083.8662109375, 9, Good Stair house 2", [14] = "-283.92623901367, 1471.0096435547, 1084.375, 15, Good Stair house 3", [15] = "-261.03778076172, 1456.6539306641, 1084.3671875, 4, Good Stair house 4", [16] = "-42.609268188477, 1405.8033447266, 1084.4296875, 8, Shitty house 3", [17] = "-68.839866638184, 1351.4775390625, 1080.2109375, 6, Shitty house 4", [18] = "2333.068359375, -1077.0648193359, 1049.0234375, 6, Shitty house 5", [19] = "1261.1168212891, -785.38037109375, 1091.90625, 5, Mad Doggs Mansion", [20] = "2215.1145019531, -1150.4993896484, 1025.796875, 15, Jefferson Motel", [21] = "2352.4575195313, -1180.9454345703, 1027.9765625, 5, Burning desire house(Buggy)", [22] = "421.94845581055, 2536.5021972656, 10, 10, Abandoned Tower", [23] = "2495.9753417969, -1692.4174804688, 1014.7421875, 3, Johnson house", [24] = "-2158.7209472656, 642.83074951172, 1052.375, 1, Bet Interior", [25] = "1701.1682128906, -1667.759765625, 20.21875, 18, Atrium lobby", [26] = "2324.499, -1147.071, 1050.71, 12, Modern House 5(Rich)", [27] = "244.411987,305.032989,999.148437, 1, 1 Room house", [28] = "271.884979,306.631988,999.148437, 2, 1 Room house", [29] = "302.180999,300.722991,999.148437, 4, 1 Room house", } for i,data in ipairs (wnetrza) do row = guiGridListAddRow(intgrid) guiGridListSetItemText(intgrid, row, icol1, tostring(i), false, true) guiGridListSetItemText(intgrid, row, icol2, data[1], false, false) guiGridListSetItemText(intgrid, row, icol3, data[2], false, false) guiGridListSetItemText(intgrid, row, icol4, data[3], false, false) guiGridListSetItemText(intgrid, row, icol5, data[4], false, false) end
  10. Hi! How can I make that some function repeat every Sunday but once at for example 12 AM? example funtion: function repeat () outputChatBox("Today is sunday!") end
  11. Hi! How can i get user id from internal.db? I mean in script.
×
×
  • Create New...