-
Posts
145 -
Joined
-
Last visited
Everything posted by Chronic
-
guiGridListSetVerticalScrollPosition ( guiElement, 100 )
-
Nevermind, I fixed it. Thanks for your help anyway.
-
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.
-
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>
-
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)
-
Quick unrelated question, why do you use hashtags in your topic names? This isn't twitter
-
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.
-
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
-
isObjectInACLGroup setPlayerTeam
-
Change x,y,z to the coordinates you want the player to spawn at, therefore editing the place the player spawns.
-
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 )
-
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 )
-
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 ) local pickups.pickup[v] = createPickup ( x, y, z, 3, 1247, 10000 ) end addEventHandler ( "onPickupHit", test, function ( player ) if isPedInVehicle ( player ) then local vehicle = getPedOccupiedVehicle ( player ) usePickup ( test, player ) setPlayerWantedLevel ( getVehicleController ( vehicle ), getPlayerWantedLevel ( getVehicleController ( vehicle ) )-1 ) else setPlayerWantedLevel ( player, getPlayerWantedLevel ( player )-1 ) usePickup ( test, player ) end end) end addEventHandler ( "onResourceStart", resourceRoot, onHit )
-
Try this (client side) local theTable = { {228, 1315.4921875, -898.7529296875, 39.578125}, {228, 1178.515625, -2036.8623046875, 69.0078125}, {228, 2432.904296875, -1584.7587890625, 13.753595352173}, {228, 475.8759765625, -1279.939453125, 16.483493804932}, {228, 2491.4052734375, -2499.5556640625, 13.655031204224} } local peds = { ped = { } } function fetchRandomOnStart_Handler( ) for _, v in ipairs ( theTable ) do local skin, x, y, z = unpack ( v ) peds.ped[v] = createPed ( skin, x, y, z ) createBlipAttachedTo ( peds.ped[v] ) end end addEventHandler("onClientResourceStart", resourceRoot, fetchRandomOnStart_Handler);
-
I tested it, and it works for me. Make sure the player exists.
-
addEventHandler ( "onPlayerChat", root, function ( msg, tp ) cancelEvent ( ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "VIP" ) ) then if ( tp == 0 ) then outputLocalMessage ( source, msg, "global" ) elseif ( tp ==2 ) then outputLocalMessage ( source, msg, "team" ) end end end ) function outputLocalMessage ( player, message, tp ) if ( tp == "global" ) then outputChatBox ( "[VIP]"..getPlayerName(player)..": "..message ) -- this would be gobal chat elseif( tp == "team" ) then -- this is the team chat end end
-
No I understood fine. However I didn't change anything in his code, I just fixed the errors.
-
I added some words because without it, it would loop through an empty table.
-
Ohhh to make a new pickup every 60 seconds, so that's why you used destroyElement. It all makes sense now
-
In line 6 you put local money = tonumber ( money ) money is never defined.
-
Nah they will see the MTA anim, just like if you installed car mods on your GTA, you would be the only one that could see it, unless the other people on the server also downloaded the same car mod.