Best-Killer
Members-
Posts
494 -
Joined
-
Last visited
Everything posted by Best-Killer
-
in dxdrawimage using that one http://imgur.com/a/h8b9f and i want it be showing ig full crosshair like this http://imgur.com/a/nVnIH no one understand me ?
-
turf server side : CODE REMOVED exports.SAEGGroupsgetPlayerGroup fine but SAEGGroups:getGroups group isn't defined and with that code , money are withdrawed to clan bank but only when the player group online ig i want if player not online ig or online ig the money withdraw to Groupbank !! any help pls ?
-
local size = 30 addEventHandler("onClientRender", root, function () local hX,hY,hZ = getPedTargetEnd ( getLocalPlayer() ) local screenX1, screenY1 = getScreenFromWorldPosition ( hX,hY,hZ ) local weapon = getPlayerWeapon(getLocalPlayer()) if weapon ~= 0 and weapon ~=1 then if getControlState("aim_weapon") then dxDrawImage(screenX1-(size/2), screenY1-(size/2), size, size, "outras/trgt.png", 0,0,0, tocolor(255,255,255,255)) end end end ) the crosshair showed ig like in photo http://imgur.com/a/h8b9f i want it be full crosshair like :http://imgur.com/a/nVnIH what i have to do guys ?
-
omg sory , line 54
-
CODE REMOVED BY Solidsnake14 debug : jail_s.lua:120: Bad Argument @ 'setElementPosition' expected vector 3 at argument 2 , got nill any help pls !
-
done but same problem and 0 errors
-
nothing 0 erros 0 warning
-
addEvent("SAEGGroups:Kills", true) addEventHandler("SAEGGroups:Kills", root,function () killgrid = guiCreateGridList(sWidth* (865/1024 ), sHeight*( 590/768 ), sWidth*( 159/1024 ), sHeight*( 178/768) , false) guiGridListAddColumn(killgrid, "Gang", 0.5) guiGridListAddColumn(killgrid, "Kills", 0.5) guiSetAlpha(killgrid, 0.73) dxDrawRectangle(sWidth*865, sHeight*590, sWidth*159, sHeight*178, tocolor(0, 0, 0, 180), false) guiSetVisible ( killgrid,true ) setTimer ( triggerServerEvent, 15000, 1, "getData", localPlayer ) end ) addEvent("SAEGGroups:KillsHide", true) addEventHandler("SAEGGroups:KillsHide", root,function () guiSetVisible(killgrid,false) end ) local hillAreaLS = createColRectangle ( -164.82, -2912.12, 65.28, 3150, 2300 ) function hill_EnterLS (plr) if (getElementType(plr) == "player") then triggerClientEvent ( plr, "SAEGGroups:Kills", plr ) end addEventHandler ( "onColShapeHit", hillAreaSF, hill_EnterLS ) function hill_LeaveLS (plr) if (getElementType(plr) == "player") then triggerClientEvent ( plr, "SAEGGroups:KillsHide", plr ) end end addEventHandler ( "onColShapeLeave", hillAreaSF, hill_LeaveLS ) gui didn't open !! what is the problem 0 errors
-
nvm it's fixed
-
local sWidth,sHeight = guiGetScreenSize() addEvent("SAEGGroups:Kills", true) addEventHandler("SAEGGroups:Kills", root,function () killgrid = guiCreateGridList(sWidth* (865/1024 ), sHeight*( 590/768 ), sWidth*( 159/1024 ), sHeight*( 178/768) , false) guiGridListAddColumn(killgrid, "Gang", 0.5) guiGridListAddColumn(killgrid, "Kills", 0.5) guiSetAlpha(killgrid, 0.73) dxDrawRectangle(sWidth*865, sHeight*590, sWidth*159, sHeight*178, tocolor(0, 0, 0, 180), false) guiSetVisible ( killgrid,true ) setTimer ( triggerServerEvent, 15000, 1, "getData", localPlayer ) end ) function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end Kills_ = {} function theLocator() local allLocation = {"Las Venturas", "San Fierro", "Las Venturas", "Los Santos"} local players = getElementsByType ( "player" ) for i, source in ipairs ( players ) do local theLocation = getElementZoneName(source, true) for theKey, allLocation in ipairs(allLocation) do if (theLocation == allLocation) then triggerClientEvent ( source, "SAEGGroups:Kills", source ) end end end end function startLocator() setTimer ( theLocator, 15000, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), startLocator ) addEventHandler("onPlayerWasted",root,function ( _,Killer ) if ( Killer and Killer ~= source and getElementType(Killer) == "player" ) then local groupPlayer = exports.SAEGGroups:getPlayerGroup( Killer ) if not Kills_[Killer] then Kills_[Killer] = 0; end Kills_[Killer] = Kills_[Killer] + 1 local Sel = exports.NGSQL:db_query("SELECT * FROM groups WHERE Name=?", groupPlayer) if ( type ( Sel ) == "table" and #Sel == 0 or not Sel ) then exports.NGSQL:db_exec(" INSERT INTO groups ( Kills ) VALUES(?)",Kills_[Killer]) else exports.NGSQL:db_exec(" UPDATE groups SET Kills = ? WHERE name = ?", Kills_[Killer], groupPlayer) end end end) addEvent ( 'getData', true) addEventHandler ( 'getData', root, function() local db = exports.NGSQL:db_query("SELECT * FROM groups") if ( type ( db ) == "table" and #db == 0 or not db ) then return end triggerClientEvent ( source, 'setData', source, db ) end ) bad argument @ 'guiGridListSetItemText' expected string at argument 4, got boolean the name shoing in gui fine but kills now
-
Kills_ = {} addEventHandler('onResourceStart',resourceRoot,function () exports.NGSQL:db_exec("CREATE TABLE IF NOT EXISTS group_kills ( Name VARCHAR(20), Kills VARCHAR(40) )") end ) addEventHandler("onPlayerWasted",root,function ( _,Killer ) if ( Killer and Killer ~= source and getElementType(Killer) == "player" ) then local groupKills = exports.SAEGGroups:getPlayerGroup( Killer ) if not Kills_[Killer] then Kills_[Killer] = 0; end Kills_[Killer] = Kills_[Killer] + 1 local Sel = exports.NGSQL:db_exec("SELECT * FROM group_kills WHERE Name=?", groupKills) if ( type ( Sel ) == "table" and #Sel == 0 or not Sel ) then exports.NGSQL:db_exec(" INSERT INTO `group_kills` ( Name, Kills) VALUES(?,?)",groupKills,Kills_[Killer]) else exports.NGSQL:db_exec(" UPDATE group_kills SET Name =?, Kills =? ",groupKills,Kills_[Killer]) end end end) addEvent ( 'getData', true) addEventHandler ( 'getData', root, function() local db = exports.NGSQL:db_query("SELECT * FROM group_kills") if (type(db) ~= "table" or (type(db)=="table" and #db==0) or not db) then return end triggerClientEvent ( source, 'setData', source, db ) end ) local screenW, screenH = guiGetScreenSize() function killListGui() killgrid = guiCreateGridList(865, 590, 159, 178, false) guiGridListAddColumn(killgrid, "Gang", 0.5) guiGridListAddColumn(killgrid, "Kills", 0.5) guiSetAlpha(killgrid, 0.73) dxDrawRectangle(865, 590, 159, 178, tocolor(0, 0, 0, 180), false) guiSetVisible ( killgrid,true ) end addEventHandler("onClientResourceStart", resourceRoot,killListGui) dx = function() dxDrawRectangle(865, 590, 159, 178, tocolor(0, 0, 0, 180), false) end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end bindKey('f4','down', function() if isEventHandlerAdded ("onClientRender", root,dx) then removeEventHandler("onClientRender", root,dx) else triggerServerEvent( 'getData', localPlayer ) addEventHandler("onClientRender", root,dx) end end) addEvent( 'setData', true ) addEventHandler ( 'setData', root, function(data) guiGridListClear ( killgrid ) table.sort ( data, function (a,b) return ( tonumber(a.Kills) or 0 ) > ( tonumber(b.Kills) or 0 )end) for k,v in ipairs ( data ) do local Row = guiGridListAddRow(killgrid) guiGridListSetItemText(killgrid,Row,1,v.name,false,false) guiGridListSetItemText(killgrid,Row,2,v.kills,false,false) if k == 10 then break end end end) 0 errors but group name & kills not added to database or showing in gui
-
i'll try to do it by myself as we talked in pm then i'll come show you how is it without guiGridListSetSelectionMode guiGridListGetSelectedItems. lol did you see me trying to decomplie it or smth ?? hhhhh so funny i'm not good scripter and i'm learning also i'm making script and i see my self need use guiGridListGetItemText without guiGridListSetSelectionMode guiGridListGetSelectedItems. i didn't see any example about in in forum or wiki but i see it in his script lol and i asked here and i pmed him i'll wait his answer , any thing else i'll keep trying to do it by myself
-
he used guiGridListGetItemText but didn't used guiGridListSetSelectionMode guiGridListGetSelectedItems.
-
but in ivse script he getitemtext without use guiGridListSetSelectionMode guiGridListGetSelectedItems.
-
addEvent( 'CreateMarker', true ) addEventHandler( 'CreateMarker', root, function( role, name, X, Y, Z, r, g, b, v, rot) local AllMarker = exports.NGSQL:db_query( "SELECT * FROM vehicle_marker" ) id = #AllMarker + 1 exports.NGSQL:db_exec( "INSERT INTO vehicle_marker ( Role, Name, posX, posY, posZ, r, g, b, Vehicles, Rotation, ID ) VALUES ( "..role..", "..name..", "..X..", "..Y..", "..Z..", "..r..", "..g..", "..b..", '..v..', '..rot..', "..id..")" ) local marker = createMarker( X, Y, Z, 'cylinder', 1.25, r, g, b, 255 ) setElementData( marker, 'giveCarSystem', true ) setElementData( marker, 'id', id ) outputChatBox( "Marker Was Created", source, 255, 255, 0 ) end ) addEventHandler("onClientGUIClick",root, function () local name = guiGetText(GUIEditor.edit[7]) local role = guiGetText(GUIEditor.edit[1]) local x,y,z = getElementPosition (getLocalPlayer()) local r, g, b = getColorFromString ( guiGetText (GUIEditor.edit[6] )) local coloredit = guiGetText (GUIEditor.edit[6]) local rot = getPlayerRotation (getLocalPlayer()) local v = guiGridListGetItemText ( GUIEditor.gridlist[2], 1, 1) if ( source == GUIEditor.button[6] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif ( source == GUIEditor.button[5] ) then guiSetText (GUIEditor.edit[2], x ) guiSetText (GUIEditor.edit[3], y ) guiSetText (GUIEditor.edit[4], z ) guiSetText (GUIEditor.edit[5], rot ) guiGetText (GUIEditor.edit[6],{r,g,b}) elseif ( source == GUIEditor.button[2] ) then currentPosition = {role,name,x,y,z,r,g,b,v,rot} if #currentPosition == 0 then return end local send = { [1] = currentPosition[1], [2] = currentPosition[2], [3] = currentPosition[3], [4] = currentPosition[4], [5] = currentPosition[5], [6] = currentPosition[6], [7] = currentPosition[7], [8] = currentPosition[8], [9] = currentPosition[9], [10] = currentPosition[10] } newPos = {} triggerServerEvent("CreateMarker", localPlayer, unpack(send)) elseif ( source == GUIEditor.button[1] ) then -----Create Marker--- elseif ( source == GUIEditor.button [3] ) then -----Remove Vehicle----- guiGridListRemoveRow(GUIEditor.gridlist[2], guiGridListGetSelectedItem(GUIEditor.gridlist[2])) elseif ( source == GUIEditor.button [4] ) then -----Add vehicle ------- local vehicletext = guiComboBoxGetSelected(GUIEditor.combobox[1]) local vehicle = guiComboBoxGetItemText(GUIEditor.combobox[1], vehicletext) local vehicleid = getVehicleModelFromName(vehicle) local row = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2],row, model,vehicleid,false,false) end end) dbExec failed; (1054) unknown column 'Job' in 'field list'
-
Thx Dude ^^ you helped me too much i got it fixed ^^ can you tell me other thing now pls ? if the gridlist have 2 rows or 5 how to use guiGridListGetItemText To get Them all ? the 2 rows or 5 rows
-
Clinet <stolen code removed> Server <stolen code removed> 0 errors and i can hack atm everytime
-
owner of this script : https://community.multitheftauto.com/index.php?p=resources&s=details&id=10589 ,, used GuiGridListGetItemText without using GuiGridListGetSeleceted Item ! can anyone tell me how he did it please ?
-
nvm ^^ i fixed it ahahah rRoot = getResourceRootElement(getThisResource()) addEventHandler( 'onResourceStart', rRoot, function( ) exports.NGSQL:db_exec ( "CREATE TABLE IF NOT EXISTS vehicle_marker ( name VARCHAR(20) ,posX VARCHAR(40), posY VARCHAR(40), posZ VARCHAR(40), r VARCHAR(40), g VARCHAR(40), b VARCHAR(40), vehicles VARCHAR(40), rotation VARCHAR(40), ID VARCHAR(40))" ) creatMarkerSystem() end ) function creatMarkerSystem() local GetAllMarker = exports.NGSQL:db_exec( "SELECT * FROM vehicle_marker" ) if ( type ( GetAllMarker ) == "table" and #GetAllMarker > 0 ) then for i = 1, #GetAllMarker do local n = {GetAllMarker[i]["name"],GetAllMarker[i]["posX"], GetAllMarker[i]["posY"], GetAllMarker[i]["posZ"], GetAllMarker[i]["r"], GetAllMarker[i]["g"],GetAllMarker[i]["b"],GetAllMarker[i]["v"],GetAllMarker[i]["rot"],GetAllMarker[i]["id"]} for ii = 1, #n do n[ ii ] = tonumber( n[ ii ] ) end local marker = createMarker( n[1], n[2], n[3], 'cylinder', 1.25, n[4], n[5], n[6], 255 ) markers[marker] = {n[8], n[9]} setElementData( marker, 'id', i ) setElementData( marker, 'giveCarSystem', true ) end end end addEvent( 'CreateMarker', true ) addEventHandler( 'CreateMarker', root, function( name, X, Y, Z, r, g, b, v, rot) if getPedOccupiedVehicle( source ) then Z = Z else Z = Z - 1 end local AllMarker = exports.NGSQL:db_exec( "SELECT * FROM vehicle_marker" ) id = AllMarker + 1 exports.NGSQL:db_exec( "INSERT INTO vehicle_marker ( name ,posX, posY, posZ, r, g, b, vehicles, rot, ID ) VALUES ( "..name..""..X..", "..Y..", "..Z..", "..r..", "..g..", "..b..","..v..""..rot.." "..id..")" ) local marker = createMarker( X, Y, Z, 'cylinder', 1.25, r, g, b, 255 ) setElementData( marker, 'giveCarSystem', true ) setElementData( marker, 'id', id ) outputChatBox( "Marker Was Created", source, 255, 255, 0 ) end ) addEventHandler( 'onMarkerHit', rRoot, function( player ) if getElementType( player ) == 'player' and not getPedOccupiedVehicle( player ) then end end) line 29 : attempt to perform arithmetic on local'AllMarker(a boolean value) any help !!
-
i have to use guiGridListSetItemData ? cuz i didn't use it also i don't know what that do i'll check it out now
-
function () if ( source == GUIEditor.button[6] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif ( source == GUIEditor.button[5] ) then local name = guiGetText(GUIEditor.edit[1]) local x,y,z = getElementPosition (getLocalPlayer()) local r, g, b = getColorFromString ( guiGetText (GUIEditor.edit[6] )) local v = guiGridListGetItemData ( GUIEditor.gridlist[2], row, mod ) local coloredit = guiGetText (GUIEditor.edit[6]) local rot = getPlayerRotation (getLocalPlayer()) if name == "" then exports.SAEGMessages:sendClientMessage("Please Enter Clan Name", getLocalPlayer(), 255, 140, 40 ) end if not guiRadioButtonGetSelected(GUIEditor.radiobutton[1]) then if not guiRadioButtonGetSelected(GUIEditor.radiobutton[2]) then return exports.SAEGMessages:sendClientMessage("Please Select Type of marker Clan/Job", getLocalPlayer(), 255, 140, 40 ) end end if coloredit == "" then return exports.SAEGMessages:sendClientMessage("Please Enter Color Marker", getLocalPlayer(), 255, 140, 40 ) end warning : bad argument @ 'guiGridListGetItemData' Expected number at argument 2 , go nill what is the problem!
-
guiGridListItemText yee that what i need but 1 qestion i can use it without GetSelecteditem ?
-
elseif ( source == GUIEditor.button [4] ) then -----Add vehicle ------- local vehicletext = guiComboBoxGetSelected(GUIEditor.combobox[1]) local vehicle = guiComboBoxGetItemText(GUIEditor.combobox[1], vehicletext) local vehicleid = getVehicleModelFromName(vehicle) local row = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2],row,1,vehicleid,false,false) end look i add vehicleids in the row fine but now how i can get them ?
