Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You forgot to define 'thePlayer'. addCommandHandler ( "door", function ( thePlayer ) -- Here
  2. Define a variable with the height, then increase it by 5 for each player.
  3. You can use the "bone_attach" resource. Link: https://community.multitheftauto.com/in ... ls&id=2540
  4. Of course not, it makes no sense, that's all a mess.
  5. Castillo

    help me

    Maybe he isn't talking about actual videos, but some sort of intro made using camera functions/peds, etc.
  6. You apologize here, yet, you sent me a PM saying it was my fault for all your problems in the forums, which is a big lie. You keep posting useless things just to increase your post count ( it's damn obvious ), and many other things.
  7. El primero se llama "groundpickups", aca te dejo el link: https://community.multitheftauto.com/in ... ls&id=1474 El segundo se llama "armas", aca el link: https://community.multitheftauto.com/in ... ls&id=3479
  8. Use the event: onClientGUIClick
  9. Castillo

    delete

    You can, just give it a try.
  10. Castillo

    delete

    I recommend you to use the "guieditor" resource to create your designs, it's really useful. Link: https://community.multitheftauto.com/in ... ils&id=141
  11. -- client side: local items = { [ "Melee" ] = { {1,0,1},{5,0,1},{6,0,1},{8,0,1} }, [ "Handguns" ] = { {23,300,100},{22,400,100},{24,500,100} }, [ "Shotguns" ] = { {25,1000,100},{26,1500,100},{27,1700,100} }, [ "Sub-Machine" ] = { {28,2000,100},{32,2100,100},{29,2200,100} }, [ "Machine Guns" ] = { {30,2500,100},{31,3000,100} }, [ "Rifles" ] = { {33,3500,100},{34,5500,100} }, [ "Projectiles" ] = { {16,15000,15},{39,500,1},{46,0,1} }, [ "Skills" ] = { {"Colt-45 Skill",250,1,69},{"Silenced-Pistol Skill",250,1,70},{"Desert-Eagle Skill",250,1,71},{"Shotgun Skill",1000,1,72},{"Sawed-off Skill",1500,1,73},{"Spaz-12 Skill",1500,1,74},{"Uzi Skill",1500,1,75},{"MP5 Skill",1500,1,76},{"AK-47 Skill",1750,1,77},{"M4 Skill",2000,1,78},{"Sniper Skill",2000,1,79} }, [ "Health" ] = { } } shopWindow = guiCreateWindow(470, 206, 449, 326,"Shop Panel",false) guiSetVisible (shopWindow, false) guiSetAlpha(shopWindow,0.65) guiWindowSetSizable(shopWindow,false) itemsGrid = guiCreateGridList(134, 25, 305, 171,false,shopWindow) guiGridListSetSelectionMode(itemsGrid,0) guiGridListAddColumn(itemsGrid,"Name",0.4) guiGridListAddColumn(itemsGrid,"Price $",0.3) guiGridListAddColumn(itemsGrid,"Amount",0.2) gridCho = guiCreateGridList(12, 25, 116, 264, false, shopWindow) gridchoColumn = guiGridListAddColumn(gridCho,"Chose",0.85) guiGridListSetSelectionMode ( gridCho, 0 ) AboutMemo = guiCreateMemo(136, 204, 303, 85, "", false, shopWindow) guiSetAlpha(itemsGrid,1) buyItem = guiCreateButton(280, 297, 100, 20, "Buy Item",false,shopWindow) closeButton = guiCreateButton(400, 297, 37, 18, "X",false, shopWindow) for cat, data in pairs ( items ) do local row = guiGridListAddRow ( gridCho ) guiGridListSetItemText ( gridCho, row, 1, tostring ( cat ), false, true ) end addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == closeButton ) then guiSetVisible ( shopWindow, false ) showCursor ( false ) elseif ( source == gridCho ) then local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local category = guiGridListGetItemText ( source, row, 1 ) guiGridListClear ( itemsGrid ) if ( items [ category ] ) then for _, item in ipairs ( items [ category ] ) do local row = guiGridListAddRow ( itemsGrid ) local name = ( category == "Skills" and item [ 1 ] or category == "Health" and item [ 1 ] or getWeaponNameFromID ( item [ 1 ] ) ) guiGridListSetItemText ( itemsGrid, row, 1, tostring ( name ), false, false ) guiGridListSetItemText ( itemsGrid, row, 2, tostring ( item [ 2 ] ), false, false ) guiGridListSetItemText ( itemsGrid, row, 3, tostring ( item [ 3 ] ), false, false ) guiGridListSetItemData ( itemsGrid, row, 1, item [ 4 ] ) guiGridListSetItemData ( itemsGrid, row, 2, category ) end end end elseif ( source == buyItem ) then local row, col = guiGridListGetSelectedItem ( itemsGrid ) if ( row and col and row ~= -1 and col ~= -1 ) then local category = guiGridListGetItemData ( itemsGrid, row, 2 ) local name = guiGridListGetItemText ( itemsGrid, row, 1 ) local price = guiGridListGetItemText ( itemsGrid, row, 2 ) local amount = guiGridListGetItemText ( itemsGrid, row, 3 ) if ( category == "Skills" ) then local id = guiGridListGetItemData ( itemsGrid, row, 1 ) triggerServerEvent ( "skillBuy", localPlayer, name, id, tonumber ( price ) ) elseif ( category == "Health" ) then -- TODO else triggerServerEvent ( "weapBuy", localPlayer, name, price, amount ) end end end end ) function viewGUI ( ) if ( localPlayer == source ) then guiSetVisible ( shopWindow, true ) showCursor ( true ) end end addEvent ( "viewGUI", true ) addEventHandler ( "viewGUI", getRootElement(), viewGUI ) -- server side: function showGui (hitPlayer, matchingDimension) triggerClientEvent ( hitPlayer, "viewGUI", hitPlayer) end ---------------------- Area 51 addEventHandler("onMarkerHit",createMarker(209.81819152832, 1859.4178466797, 12,"cylinder",2,187,5,175,170),showGui) local blip = createBlip(209.81819152832, 1859.4178466797, 150, 6, 0, 0, 0, 0, 0, 0, 1000) ---------------------- Sillent Killers addEventHandler("onMarkerHit",createMarker(-1379.8349609375, 493.78100585938, 20.200000762939,"cylinder",2,187,5,175,170),showGui) local blip = createBlip(-1379.8349609375, 493.78100585938, 20.200000762939, 6, 0, 0, 0, 0, 0, 0, 1000) ---------------------- Ghost Town addEventHandler("onMarkerHit",createMarker(3986.9541015625, -2089.8010253906, 34.1,"cylinder",2,187,5,175,170),showGui) local blip = createBlip(3986.9541015625, -2089.8010253906, 34.1, 6, 0, 0, 0, 0, 0, 0, 1000) ---------------------- Vertigo addEventHandler("onMarkerHit",createMarker(1618.8389892578, 995.63299560547, 11.5,"cylinder",2,187,5,175,170),showGui) local blip = createBlip(1618.8389892578, 995.63299560547, 11.5, 6, 0, 0, 0, 0, 0, 0, 1000) ---------------------- Zombie Base addEventHandler("onMarkerHit",createMarker(1726.7969970703, -3491.5029296875, 20.170000076294,"cylinder",2,187,5,175,170),showGui) local blip = createBlip(1726.7969970703, -3491.5029296875, 20.170000076294, 6, 0, 0, 0, 0, 0, 0, 1000) addEvent ( "weapBuy", true ) addEventHandler ( "weapBuy", getRootElement(), function ( name, price, ammo ) local price = tonumber ( price ) if ( getPlayerMoney ( client ) >= price ) then outputChatBox ( "You bought: ".. name .." for $".. price .."!", client, 0, 255, 0 ) takePlayerMoney ( client, price ) giveWeapon ( client, getWeaponIDFromName ( name ), tonumber ( ammo ), true ) else outputChatBox ( "You don't have enough money!", client, 255, 0, 0 ) end end ) function skillBuyPlayer ( name, id, price ) if ( getPlayerMoney ( client ) >= price ) then takePlayerMoney ( client, price ) setPedStat ( client, id, 999 ) outputChatBox ( "You bought: ".. name .." for $".. price .."!", client, 0, 255, 0 ) else outputChatBox ( "You don't have enough money!", client, 255, 0, 0 ) end end addEvent ( "skillBuy", true ) addEventHandler ( "skillBuy", getRootElement(), skillBuyPlayer ) I made it for you this time, but don't expect me to do it again with anything else.
  12. You can add a watermark to your image, is what we are doing with our new designs at my server.
  13. As I told you over PM, that's just the first part. And is not even right, it should be like this: local weapons = { [ "Melee" ] = { {1,0,1},{5,0,1},{6,0,1},{8,0,1} }, [ "Handguns" ] = { {23,300,100},{22,400,100},{24,500,100} }, [ "Shotguns" ] = { {25,1000,100},{26,1500,100},{27,1700,100} }, [ "Sub-Machine" ] = { {28,2000,100},{32,2100,100},{29,2200,100} }, [ "Machine Guns" ] = { {30,2500,100},{31,3000,100} }, [ "Rifles" ] = { {33,3500,100},{34,5500,100} }, [ "Projectiles" ] = { {16,15000,15},{39,500,1},{46,0,1} } }
  14. Maybe "*" doesn't include 'rowid' column.
  15. El evento "onPlayerDamage" no se puede cancelar.
  16. It could be because you created a column set as "PRIMARY KEY", try removing this column from the table: "id INT IDENTITY( 1,1 ) PRIMARY KEY"
  17. So, it works with all the other columns, but not with 'rowid'?
  18. Have you tried getting another data name? such as "name" instead of "rowid".
  19. I suggest you change the table formats to something like this: local items = { [ "Melee" ] = { -- Weapon, price { 4, 500 } }, [ "Handguns" ] = { { 22, 400 }, } }
  20. And, is the name of the player in the table?
×
×
  • Create New...