Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. iPrestege

    Help

    You can send the script "PM" and i w'll decompile it .
  2. Sorry I Can't just type the same command and the window will close ( =
  3. Do you need a tea? Sorry i can't .
  4. --Some vars --Author TwiX [[Don't Remove This Line]] local sW,sH = guiGetScreenSize ( ); local gUtils = { }; gUtils.guiW,gUtils.guiH = 398, 410; gUtils.posX,gUtils.posY = sW / 2 - gUtils.guiW / 2, sH / 2 - gUtils.guiH / 2; --Center of screen for all resolutions local gLabels = { }; local gButtons = { }; function createGui ( ) gWindow = guiCreateWindow ( gUtils.posX, gUtils.posY, gUtils.guiW, gUtils.guiH, "Mini Map Shop v0.7", false ); gLabels[1] = guiCreateLabel ( 206, 30, 161, 19, "Money:", false, gWindow ); gLabels[2] = guiCreateLabel ( 206, 49, 100, 16, "Map Costs 5000$", false, gWindow ); gLabels[3] = guiCreateLabel ( 206, 66, 82, 15, "Selected Map:", false, gWindow ); gLabels[4] = guiCreateLabel ( 206, 145, 188, 22, "Buy Maps Shop by TwiX", false, gWindow ); gLabels[5] = guiCreateLabel ( 206,165,67,22, "Search Map:", false, gWindow ); gLabels[6] = guiCreateLabel ( 206,215,188,22, "Top 1: ", false, gWindow ); gLabels[7] = guiCreateLabel ( 206,235,188,22, "Top 2: ", false, gWindow ); gLabels[8] = guiCreateLabel ( 206,255,188,22, "Top 3: ", false, gWindow ); gUtils[1] = guiCreateLabel ( 206, 86, 188, 16, "Please select any map", false, gWindow ); gUtils[2] = guiCreateLabel ( 206, 106, 188, 16, "Played: N/A", false, gWindow ); gUtils[3] = guiCreateLabel ( 206, 125, 188, 16, "Rating: N/A", false, gWindow ); for _, label in ipairs ( gUtils ) do guiLabelSetColor ( label, 171, 205, 239 ); guiSetFont ( label, "default-bold-small" ); end for _, label in ipairs ( gLabels ) do guiSetFont ( label, "default-bold-small" ); if label == gLabels[3] then guiLabelSetColor ( gLabels[3], 0, 255, 0 ); end end gButtons[1] = guiCreateButton ( 206, 366, 182, 35, "Buy as next map", false, gWindow ); gButtons[2] = guiCreateButton ( 206, 277, 68, 21, "[DM]", false, gWindow ); gButtons[3] = guiCreateButton ( 322, 277, 68, 21, "[DD]", false ,gWindow ); gButtons[4] = guiCreateButton ( 206, 301, 68, 21, "[FUN]", false, gWindow ); gButtons[5] = guiCreateButton ( 322, 301, 68, 21, "[TRIALS]", false, gWindow ); gButtons[6] = guiCreateButton ( 260, 335, 68, 21, "[ALL]", false, gWindow ); gGridList = guiCreateGridList ( 11, 32, 191, 395, false, gWindow ); guiGridListSetSelectionMode ( gGridList, 2 ); gColumn = guiGridListAddColumn ( gGridList, "Name:", 0.85 ); guiWindowSetSizable ( gWindow, false ); pEdit = guiCreateEdit ( 206, 185, 153, 26, "", false, gWindow ); guiSetVisible ( gWindow, false ); addEventHandler ( "onClientGUIClick", getResourceRootElement ( getThisResource ( ) ), somethingFromClick ); addCommandHandler("dshop",showPanel) end addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ), createGui ) function showPanel ( ) if guiGetVisible ( gWindow ) then guiSetVisible ( gWindow, false ); showCursor ( false ); removeEventHandler ( "onClientGUIChanged", pEdit, startSearchMap ); else triggerServerEvent ( "doRefreshMapList", localPlayer, localPlayer ); addEventHandler ( "onClientGUIChanged", pEdit, startSearchMap ); guiSetVisible ( gWindow, true ); showCursor ( true ); local playerMoney = getPlayerMoney ( ); guiSetText ( gLabels[1], "Money: [ " .. playerMoney .. " ]" ); end end function somethingFromClick ( button, state ) local row = guiGridListGetSelectedItem ( gGridList ); if row == -1 then guiSetText ( gUtils[1], "Error! Please Select any map" ); guiSetText ( gUtils[2], "Played: N/A" ); guiSetText ( gUtils[3], "Rating: N/A" ); guiSetText ( gLabels[6], "Top 1: N/A" ); guiSetText ( gLabels[7], "Top 2: N/A" ); guiSetText ( gLabels[8], "Top 3: N/A" ); end if source == gButtons[1] then local mName = guiGridListGetItemText ( gGridList, row, gColumn ); triggerServerEvent ( "doBuyMap", localPlayer, localPlayer, mName ); elseif source == gGridList then local mapName = guiGridListGetItemText ( gGridList, row, gColumn ); guiSetText ( gUtils[1], mapName ); triggerServerEvent ( "doGetResultFormap", localPlayer, localPlayer, mapName ); elseif source == gButtons[2] then filterForMaps ( 1 ); elseif source == gButtons[3] then filterForMaps ( 2 ); elseif source == gButtons[4] then filterForMaps ( 3 ); elseif source == gButtons[5] then filterForMaps ( 4 ); elseif source == gButtons[6] then filterForMaps ( 5 ); end end function setMapNameInGrid ( gamemodeMapTable, gamemode, map, s ) guiGridListClear ( gGridList ); if gamemodeMapTable then aGamemodeMapTable = gamemodeMapTable; for id, gamemode in pairs ( gamemodeMapTable ) do if ( gamemode.name == "Race" ) then for id, map in ipairs ( gamemode.maps ) do if s then if string.find ( string.lower ( map.name ), string.lower ( s ) ) then local row = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, row, gColumn, map.name, false, false ); end else local row = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, row, gColumn, map.name, false, false ); end end end end end end addEvent ( "refreshCompleted", true ) addEventHandler ( "refreshCompleted", root, setMapNameInGrid ) function startSearchMap ( ) if not source == pEdit then return end guiGridListClear ( gGridList ); if guiGetText ( pEdit ) ~= "" then local found = 0; for id, gamemode in pairs ( aGamemodeMapTable ) do if ( gamemode.name == "Race" ) then for id, map in ipairs ( gamemode.maps ) do if string.find ( string.lower ( map.name ), string.lower ( guiGetText(pEdit):lower ( ) ), 0, true ) ~= nil then local row = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, row, 1, map.name, false, false ); found = found + 1; end end end end if found == 0 then local row = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, row, 1, "Map not found", false, false ); guiGridListSetItemColor ( gGridList, row, 1, 255, 0, 0 ); end else for id, gamemode in pairs ( aGamemodeMapTable ) do if ( gamemode.name == "Race" ) then for id, map in ipairs ( gamemode.maps ) do local row = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, row, 1, map.name, false, false ); end end end end end function filterForMaps ( mode ) -- Bad function will loop all maps. I don't recommend, only if you want this local mode = tonumber ( mode ); guiGridListClear ( gGridList ); for id, gamemode in pairs ( aGamemodeMapTable ) do if ( gamemode.name == "Race" ) then for id, map in ipairs ( gamemode.maps ) do if mode == 1 then if string.find ( map.name, "[DM]", 1, true ) then local gRow = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, gRow, gColumn, map.name, false, false ); end elseif mode == 2 then if string.find ( map.name, "[DD]", 1, true ) then local gRow = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, gRow, gColumn, map.name, false, false ); end elseif mode == 3 then if string.find ( map.name, "[FUN]", 1, true ) then local gRow = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, gRow, gColumn, map.name, false, false ); end elseif mode == 4 then if string.find ( map.name, "[TRIALS]", 1, true ) then local gRow = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, gRow, gColumn, map.name, false, false ); end elseif mode == 5 then local gRow = guiGridListAddRow ( gGridList ); guiGridListSetItemText ( gGridList, gRow, gColumn, map.name, false, false ); end end end end end function guiSetMapText ( played, rating, count, name1, theTime1, name2, theTime2, name3, theTime3 ) if played == 1 then p = "Played: First time"; else p = "Played: ["..played.." times]"; end guiSetText ( gUtils[2], p ); if count == 1 then prefix = ""; else prefix = "'s"; end if rating then text = "Rating: [" .. rating .. "/10] by ( " .. count .. " ) player" .. prefix; else text = "Not Rated Yet"; end guiSetText ( gUtils[3], text ); if name1 and theTime1 then guiSetText ( gLabels[6], "Top 1: " .. name1 .. " - " .. theTime1 ); else guiSetText ( gLabels[6], "Top 1: N/A" ); end if name2 and theTime2 then guiSetText ( gLabels[7], "Top 2: " .. name2 .. " - " .. theTime2 ); else guiSetText ( gLabels[7], "Top 2: N/A" ); end if name3 and theTime3 then guiSetText ( gLabels[8], "Top 3: " .. name3 .. " - " .. theTime3 ); else guiSetText ( gLabels[8], "Top 3: N/A" ); end end addEvent ( "doUpdateLabels", true ) addEventHandler ( "doUpdateLabels", root, guiSetMapText ) fileDelete ( "tx_mapsShop_c.lua" ); Please Replace This Code On This File : tx_mapsShop_c.lua and change the command @ line @ 43
  5. LoooL , About this i can't find any thing about bindKey?
  6. Why? Restart script and Login again!
  7. -- Server Side ( = addEventHandler("onPlayerLogin",root, function () if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setElementModel(source,id) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then setElementModel(source,id) end end )
  8. Like That? function createAdminTeamOnStart () theTeam = createTeam ( "Proklatě Dobré Kuře", 0, 255, 255 ) end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, theTeam) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCModerator")) then setPlayerTeam(source, theTeam) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCSuperModerator")) then setPlayerTeam(source, theTeam) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam)
  9. لا بس ذا مدري وش مشكلتة ~ فـ سويتة لك كذا ولا تقدر تسوي elseif ( source == Button ) then -- Code
  10. جرب ذا addEventHandler("onClientGUIClick",GUIEditor_Button[4], function () guiSetVisible(Vehicle,false) showCursor(false) end,false)
  11. This script a lot of mistakes won't work .
  12. Just try and i'll help you .
  13. جرب ماجربتة بس المفروض يشتغل ~ addEvent("Sultan",true) addEventHandler("Sultan",root, function() if getElementData ( source, "destroy" ) then destroyElement ( getElementData( source, "destroy" )) end local x,y,z = getElementPosition (source) Sultan = createVehicle (411,x,y,z) warpPedIntoVehicle(source,Sultan) setElementData ( source,"destroy", Sultan ) end )
  14. marker = createMarker ( x,y,z, "cylinder", 1, 255, 255, 0, 255 )
  15. isObjectInACLGroup setElementModel "onPlayerLogin"
  16. تقدر تقول تختصر او او ترتب تجمع..الخ ~ شوف الموضوع اللي بـ دروس البرمجة .
  17. function createAdminTeamOnStart () KFCMOD = createTeam ( "KFCModerator", 0, 255, 255 ) KFCSUP = createTeam ( "KFCSuperModerator", 0, 255, 255 ) ADMIN = createTeam ( "Admin", 0, 255, 255 ) end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, ADMIN) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCModerator")) then setPlayerTeam(source, KFCMOD) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCSuperModerator")) then setPlayerTeam(source, KFCSUP) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) Like that?
  18. Post the script not mine i mean that one have error .
  19. جرب كذا بـما انك ماسويت لااي دي في الجدول / GUIEditor_Grid = {} GUIEditor_Button = {} Vehicle = guiCreateWindow(453,218,302,379,"x[ Vehicle Systm ]x",false) guiSetVisible(Vehicle,false) guiSetAlpha (Vehicle, 1) GUIEditor_Button[5] = guiCreateButton (0.0795,0.8575,0.4007,0.1135,"x[ set ]x",true,Vehicle) GUIEditor_Button[4] = guiCreateButton (0.5166,0.8602,0.4007,0.1135,"x[ close ]x",true,Vehicle) GUIEditor_Grid[1] = guiCreateGridList(0.106,0.1214,0.7583,0.6887,true,Vehicle) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) local col = guiGridListAddColumn(GUIEditor_Grid[1],"Vehicle ",0.9) guiSetAlpha(GUIEditor_Grid[1],0.89999997615814) CarsTable = { { "Sultan" }, { "Banshee" }, { "Cheetah" }, { "Admiral" }, } for i, v in ipairs ( CarsTable ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1, v[1], false, true ) end marker = createMarker ( x,y,z, "cylinder", 2, 255, 0, 0, 255 ) addEventHandler("onClientMarkerHit",marker, function (player) if (getElementType (player) == "player") and (player == localPlayer) and not isPedInVehicle (player) then guiSetVisible(Vehicle,true) showCursor(true) end end ) addEventHandler("onClientGUIClick",root, function() if (source == GUIEditor_Button[5]) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) local get = guiGridListGetItemText(GUIEditor_Grid[1], row, 1 ) if ( row and col and row ~= -1 and col ~= -1 ) then if ( get == "Sultan" ) then triggerServerEvent("Sultan", localPlayer) guiSetVisible(Vehicle,false) showCursor(false) end end end end ) راح يجيب كل كلام الجريد ليست انت سوي elseif ( get == "الكلمة يعني السيارهـ اللي بالجدول") then triggerServerEvent(...) وعلى هذا النحو وهذي السيرفر : addEvent("Sultan",true) addEventHandler("Sultan",root, function () local x,y,z = getElementPosition (source) Sultan = createVehicle (411,x,y,z) warpPedIntoVehicle(source,Sultan) end )
×
×
  • Create New...