Jump to content

deltamta

Members
  • Posts

    31
  • Joined

  • Last visited

About deltamta

  • Birthday 11/08/1997

Details

  • Location
    Bucharest, Romania
  • Occupation
    School at the moment.
  • Interests
    Playing MTA:SA, DM Gamemode in Twisted Gamers Clan.

deltamta's Achievements

Rat

Rat (9/54)

0

Reputation

  1. It works awesome and well and thanks GTX. But when I run the scripts shouldn't it like play the music and load the files etc. ? Cause it doesn't although the files are downloaded. If you could help me with that guys would be awesome. Regards, Delta.
  2. I don't wanna save a freakin' script I wanna save a file. For example lets say a music file. In order to be ran I need to save it in the client cache. Since I'm using 'pcall ( loadstring )' I have to transfer everything manually. And even if you don't understand can't you just tell me how to move a file from serverside to clientside. I know why I wanna do that. Regards, Delta.
  3. Not if you want to do what I'm trying to succeed. I want to make a server with many gamemodes inside and to succeed that I have to trigger the map elements, scripts and files Client Side to load them for the specific player that has joinned the specific gamemode. All I want to know is how to trigger a file from server side to client side so I can stick it in cache. Regards, Delta.
  4. Hello guys, I was just wondering if there is a way to transmit Server Side files within maps to Client Side Cache. I already looped through a map's file but I can't seem to understand how to transfer the actual file to client side. The reason I wanna do that is cause I'm running clientside scripts on 'pcall ( loadstring )' and no meta file from the actual map is read. So I can't play the music files etc etc. I tried something like that : Server Side : for Index, MapFile in ipairs( g_RaceFiles ) do -- For all the scripts read them completely. g_RaceFiles[Index] = { } g_RaceFiles[Index].names = MapFile g_RaceFiles[Index].files = readMapFile ( readMapFile ( ":"..MapResourceName.."/"..MapFile ) ) end triggerLatentClientEvent ( Player, 'onClientReceiveMap', 9999999999999, false, Player, g_Vehicles, g_Spawnpoints, g_Checkpoints, g_Objects, g_Pickups, g_RaceScriptFiles, g_RaceFiles ) ReadMapFile Server Side Function : function readMapFile ( MapFile ) local file = fileOpen( MapFile ) if ( file ) then local scriptInformation = fileRead( file, fileGetSize( file ) ) fileClose( file ) return scriptInformation end return false end Client Side : for i, file in ipairs ( g_RaceFiles ) do outputChatBox ( file.files ) local RaceFile = fileCreate( file.names ) if ( RaceFile ) then local RaceWrite = fileWrite ( RaceFile, file.files ) if ( RaceWrite ) then fileClose ( RaceFile ) outputChatBox ( "#ff8c00* #ffffffSuccessfully have written inside the file.", 255, 255, 255, true ) end end end This though doesn't seem to work... I would appreciate some help Regards, Delta
  5. As GTX said a Port is already in use or blocked. Try to close your skype and try again.
  6. I found another way I made my own functions like getDXAlpha setDXAlpha it works now just kept adding 10 everytime.
  7. I'm making my own client side library for making scripts easy in the future ( I might be releasing ) and I have a query. Could you please tell me how could I fade a player screen through time? I tried some ways but it doesnt fade it through time. And fadeCamera fades it completely Thanks
  8. deltamta

    save [help]

    Im not so sure but try function playerLogin (_, theCurrentAccount, autoLogin) local account = getAccountName (theCurrentAccount ) if not (isGuestAccount (account)) then -- no need to get the players account local accountData = getAccountData (account , "Deaths") local accountData = getAccountData (account , "Kills") if (accountData) then setElementData(source,"Deaths",accountData ) --use the account data var instead of getting another var plus use setElementData setElementData(source,"Kills",accountData ) --use the account data var instead of getting another var plus use setElementData end end end addEventHandler("onPlayerLogin", getRootElement(), playerLogin)
  9. yes ofc i did that and I also put HTTP port But still aint working. ( I also tested with a different host but still nothing )
  10. Sorry for bumping but your code gives me an ERROR 22! I have read CURL and it shows this : CURLE_HTTP_RETURNED_ERROR (22) This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400. Sorry if I look like a nab but i actually never worked with callRemote.
  11. Crystal ur suggestion is good but I figured out another way to do it and it works. I just created a GUI and set the alpha to 0 so when the mouse hovers over the gui it draws the dx rectangle. It might sound weird but it works well
  12. Heyo Guys, I have a query... As you all might know on GUI's we use onClientMouseEnter or onClientMouseLeave as hover functions to make our GUI's look cooler But im making a script using dx Drawings and I was curious if there is any specific function when you hover a dx Rectangle to change to a different color Thanks, Delta
  13. It has to set a timer of 10 seconds to increase +30 hp every second till it has reached @ about 333 hp
  14. Heyo, I have a quick query because I'm trying to make a race function... I want to make a function that when your vehicle's health reaches to a critical moment so basically just before it starts burning, I want it to slowly start replenishing it's health to 30% in 30 seconds. ( I also want it to wait 10 seconds before the replenishment proccess starts ) Now I don't want it to pass 30% because then the script would not be fair for other players ... Here is my research till now : --[[ Repair Script By *Delta^# ]] function setHealth ( loss ) vehicle = source setTimer ( function () local health = getElementHealth ( vehicle ) outputChatBox ( health ) if ( health <= 120 ) then setElementHealth( vehicle, health + 30.0) end end, 1000, 0 ) end addEventHandler( "onVehicleDamage", getRootElement(), setHealth ) Thank you.
  15. Hi I made a nice version which you can do /collide [which player you should collide] [yes or no] and only admins can set collisions on and off! It might not work though cause I made it in school and didn't have a chance to test it! If it doesn't work just tell me so I can get home and fix it. ( Credits go to NeXTreme for making the : getPlayerFromParticalName(thePlayerName) which is usefull so you don't have to put the exact name ) Also make sure the ends and elses are correctly because I kind of rushed! It is server side Here : -- Damage proof Script for by *Delta^# -- addCommandHandler ( "collide", function ( player, command, playerName, check ) if ( isObjectInACLGroup( "user." .. getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Admin" ) ) ) then if ( playerName and check ) then if (getPlayerFromParticalName (playerName)) then whichPlayer = (getPlayerFromParticalName (playerName)) vehicle = getPedOccupiedVehicle ( whichPlayer ) if ( check == "yes" ) then damagetrue = setVehicleDamageProof ( vehicle, true ) if ( damagetrue ) then outputChatBox ( "#ff8900[iNFO] #ffffffYou have became damage proof by #ff8900"..player, whichPlayer, 255, 137, 0, true ) outputChatBox ( "#ff8900[iNFO] #ffffffYou have successfully made #ff8900"..whichPlayer.. "#ffffff damage proof", player, 255, 137, 0, true ) end elseif ( check == "no" ) then if ( damagetrue ) then damagefalse = setVehicleDamageProof ( vehicle, false ) if ( damagefalse ) then outputChatBox ( "#ff8900[iNFO] #ffffffYou have unbecame damage proof by #ff8900"..player, whichPlayer, 255, 137, 0, true ) outputChatBox ( "#ff8900[iNFO] #ffffffYou have successfully made #ff8900"..whichPlayer.. "#ffffff undamage proof", player, 255, 137, 0, true ) end else outputChatBox ( "#ff8900[iNFO] #ffffffPlayer is already undamage proof!", player, 255, 137, 0, true ) end else outputChatBox ( "#ff8900[iNFO] #ffffffIncorect syntax : #ff8900/collide [player] [yes/no]", player, 255, 137, 0, true ) end else outputChatBox ( "#ff8900[iNFO] #ffffffCannot find player : #ff8900 "..playerName, player, 255, 137, 0, true ) end else outputChatBox ( "#ff8900[iNFO] #ffffffIncorect syntax : #ff8900/collide [player] [yes/no]", player, 255, 137, 0, true ) end else outputChatBox ( "#ff8900[iNFO] #ffffffYou are not an Administrator therefore you cannot access this command!", player, 255, 137, 0, true ) end end ) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end
×
×
  • Create New...