-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
That's because you are creating the file every time, you should have put the fileCreate function outside the loop. function printAllData ( thePlayer ) local playerAccount = getPlayerAccount ( thePlayer ) if ( playerAccount ) then local data = getAllAccountData ( playerAccount ) local count = 0 if ( data ) then local accountLog = fileCreate ( "accounts/".. getAccountName ( playerAccount ) ..".log" ) for k, v in pairs ( data ) do count = ( count + 1 ) outputChatBox ( "\n".. k .." :".. v ) fileWrite ( accountLog, "\n".. k ..": ".. v ) end outputChatBox ( "table holds ".. count .." entries" ) fileClose ( accountLog ) end end end addCommandHandler ( "loopx", printAllData )
-
function lol ( ) local thefile = fileCreate ( "lol.txt" ) for index, player in ipairs ( getElementsByType ( "player" ) ) do local theirdata = getElementData ( player, "data" ) fileWrite ( thefile, "\n\n".. getPlayerName ( player ) .." - ".. theirdata ) end fileClose ( thefile ) end addCommandHandler ( "loop", lol ) That?
-
I don't get what do you want to do.
-
With guieditor is easy, you can just right click on the progress bar and create the image.
-
Set the parent of the image to the progress bar.
-
No, pero podes hacerlo comparando la posicion con una guardada previamente.
-
local gate1 = createObject ( 980, -2085.8994140625, -213, 37.099998474121, 0, 0, 0 ) local status = false addCommandHandler ( "move", function ( ) if ( status ) then status = false moveObject ( gate1, 4000, -2085.8999023438, -213, 29.10000038147 ) else status = true moveObject ( gate1, 4000, -2085.8999023438, -213, 37.099998474121 ) end end ) Try that.
-
The event: onClientGUIClick is used for ANY GUI element, not just buttons.
-
I don't understand what do you mean, the script I posted should reset all saved weapons when get killed, no need to edit it.
-
col = createColTube ( -871.99, 1638.93, 28.7, 10, 3 ) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. door = createObject ( 980, -871.990234375, 1638.9345703125, 28.7, 0, 0, 212.5 ) -- enter the ID of the object followed by the coordinates -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. function Open ( pla ) if ( getElementType ( pla ) == "player" ) then if ( not isPedOnVehicle ( pla ) ) then if exports.factions:isPlayerInFaction ( pla, 1 ) then --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group. moveObject ( door, 2200, -875.990234375, 1638.9345703125, 28.7 ) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. end end end end addEventHandler ( "onColShapeHit", col, Open ) function Close ( pla ) if ( getElementType ( pla ) == "player" ) then if ( not isPedOnVehicle ( pla ) ) then if exports.factions:isPlayerInFaction ( pla, 1 ) then moveObject ( door, 2951, -871.990234375, 1638.9345703125, 28.7 ) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. end end end end addEventHandler ( "onColShapeLeave", col, Close ) 1: There was no need to use addEvent. 2: "if vehicle or not vehicle then" that check was useless, see my code I added: if ( not isPedOnVehicle ( pla ) ) then 3: No need to return '0'.
-
guiCreateStaticImage guiCreateLabel
-
Add this to your save system: addEventHandler ( "onPlayerWasted", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then setAccountData ( account, "zmgm.weaponID0", 0 ) setAccountData ( account, "zmgm.weaponID1", 0 ) setAccountData ( account, "zmgm.weaponID2", 0 ) setAccountData ( account, "zmgm.weaponID3", 0 ) setAccountData ( account, "zmgm.weaponID4", 0 ) setAccountData ( account, "zmgm.weaponID5", 0 ) setAccountData ( account, "zmgm.weaponID6", 0 ) setAccountData ( account, "zmgm.weaponID7", 0 ) setAccountData ( account, "zmgm.weaponID8", 0 ) setAccountData ( account, "zmgm.weaponID9", 0 ) setAccountData ( account, "zmgm.weaponID10", 0 ) setAccountData ( account, "zmgm.weaponID11", 0 ) setAccountData ( account, "zmgm.weaponID12", 0 ) end end )
-
I don't get what do you mean, you can make a table with skins and then loop that table and insert them on the grid list.
-
Functions: createMarker triggerServerEvent getPlayerMoney takePlayerMoney setElementModel Events: onMarkerHit onClientGUIClick
-
You want to reset weapons after killed?
-
"UTF-8 without BOM" can be compiled, "UTF-8" can't.
-
What do you mean by "skins"? You can add items to grid lists with: guiGridListAddRow guiGridListSetItemText
-
That script will save weapons on quit and load them on login.
-
That script has no onPlayerWasted event, how could it be saved after death?
-
You should learn the basics before start editing scripts, else you'll mess it up.
-
You must edit the script, post it here.
-
No offense, but that's just random code.
-
No, that doesn't make any sense.