Jump to content

Chronic

Members
  • Posts

    145
  • Joined

  • Last visited

About Chronic

  • Birthday 19/11/1998

Details

  • Gang
    Nerd Gaming

Chronic's Achievements

Poot-butt

Poot-butt (14/54)

1

Reputation

  1. guiGridListSetVerticalScrollPosition ( guiElement, 100 )
  2. Chronic

    XML Loading

    Nevermind, I fixed it. Thanks for your help anyway.
  3. Chronic

    XML Loading

    I don't think it matters what I'm trying to achieve, I was just testing if the XML loaded properly, which it didn't. Your XML file didn't work either, it still won't load.
  4. Chronic

    XML Loading

    Hey guys, I'm really not getting this I'm wondering if anyone can explain this to me. Outputs true, so the file exists: outputChatBox ( tostring ( fileExists ( "files/settings.xml" ) ) ) However, this outputs false, and I don't understand why. local xml = xmlLoadFile ( "files/settings.xml" ) outputChatBox ( tostring ( xml ) ) The xml file looks like this: <settings rAccount="true" username="dkjslkd" password="ddsldklsd"></settings>
  5. marker = createMarker(1561, -1024, 24, "cylinder", 1, 0, 0, 255, 0) local screenX, screenY = guiGetScreenSize() local width, height = 611, 632 local x = (screenX/387) - (width/6) local y = (screenY/98) - (height/6) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Walking Style By SeXyGhost",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) sneakBut = guiCreateButton(35,42,173,130,"Sneak",true,theWindow) sexywomanBut = guiCreateButton(348,47,184,125,"Sexy Women",true,theWindow) proBut = guiCreateButton(36,209,172,139,"PrO",true,theWindow) joggerBut = guiCreateButton(348,206,184,142,"Jogger",true,theWindow) blindguyBut = guiCreateButton(37,385,171,137,"Blind Guy",true,theWindow) drunkmanBut = guiCreateButton(351,381,188,141,"Drunk Man",true,theWindow) function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(theWindow) then guiSetVisible(theWindow, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, markerhit)
  6. Quick unrelated question, why do you use hashtags in your topic names? This isn't twitter
  7. Chronic

    XML loading

    Thanks, it works
  8. Chronic

    XML loading

    Yes it's saved to /mods/deathmatch/resources[my resource/path here] (client-side) The file is there, but it doesn't load, even if it creates a new one.
  9. Chronic

    XML loading

    Hey guys, I'm having a problem with xmlLoadFile --top of the script xmlClientSettingsFile = xmlLoadFile ( "files/settings.xml" ) if xmlClientSettingsFile then outputChatBox ( "File Loaded" ) elseif not xmlClientSettingsFile then xmlClientSettingsFile = xmlCreateFile ( "files/settings.xml", "settings" ) if xmlClientSettingsFile then outputChatBox ( "Works dawg" ) else outputChatBox ( "Nope" ) end end The file exists in my MTA\mods\deathmatch folder, but it doesn't load for some reason. It always creates a new file at line 6, but still outputs "Nope" at line 9
  10. Chronic

    spawn

    Change x,y,z to the coordinates you want the player to spawn at, therefore editing the place the player spawns.
  11. Chronic

    spawn

    addEventHandler ( "onPlayerWasted", root, function ( ) spawnPlayer ( source, x, y, z ) -- fill in x,y,z with the coordinates you want the player to spawn at. end )
  12. Chronic

    Question

    It would look something like if isPedInVehicle ( getPlayerFromName ( "Chronic" ) ) then local veh = getPedOccupiedVehicle ( getPlayerFromName ( "Chronic" ) ) destroyElement ( veh ) end
  13. Ah, my bad I was using his other script and forgot to change test to pickups.pickup[v] Thanks for letting me know local Positions = { { 653.35773, -1769.18567, 13.57368 }, { 664.65936, -1755.74182, 13.45477 }, } local pickups = { pickup = { } } function onHit ( ) for _, v in ipairs ( Positions ) do local x, y, z = unpack ( v ) pickups.pickup[v] = createPickup ( x, y, z, 3, 1247, 10000 ) addEventHandler ( "onPickupHit", pickups.pickup[v], function ( player ) if isPedInVehicle ( player ) then local vehicle = getPedOccupiedVehicle ( player ) usePickup ( pickups.pickup[v], player ) setPlayerWantedLevel ( getVehicleController ( vehicle ), getPlayerWantedLevel ( getVehicleController ( vehicle ) )-1 ) else setPlayerWantedLevel ( player, getPlayerWantedLevel ( player )-1 ) usePickup ( pickups.pickup[v], player ) end end) end end addEventHandler ( "onResourceStart", resourceRoot, onHit )
×
×
  • Create New...