Jump to content

h4x7o0r

Members
  • Posts

    203
  • Joined

  • Last visited

Everything posted by h4x7o0r

  1. h4x7o0r

    Push script

    Thank you for reply, i have had ur resource but as i remember it's encrypted and can't inspect the code to see how it works.
  2. h4x7o0r

    Push script

    Thank you very much SolidSnake14 for all your help. I've modified the findPlayer function and not it works as i want . Here's is the final code : function push (thePlayer, commandName, namepart) local player = findPlayer(namepart) if (not player) then outputChatBox("* /push: player not found", thePlayer) else local vehicle = getPedOccupiedVehicle(player) if (not vehicle) then outputChatBox("* /push: This player is not in a vehicle", thePlayer) return end local x,y,z = getElementVelocity(vehicle) setElementVelocity ( vehicle, x, y, z + 0.25 ) end end addCommandHandler("push", push) function findPlayer(thePlayer) if not thePlayer then return false end local thePlayer = thePlayer:lower() for i, p in ipairs(getElementsByType("player")) do local fullname = getPlayerName(p):lower() if string.find(fullname:gsub("#%x%x%x%x%x%x", ""), thePlayer, 1, true) then return p end end return false end And now maybe another hard part i don't have any ideea how can i make that GUI ?
  3. h4x7o0r

    Push script

    Thank you very mych, yeah, not i checked with full name and i see that it needs to be the same, can't use only a part of the name.
  4. h4x7o0r

    Push script

    Thank you for your help. For the moment was my bad that i've had set "client" not "server-side" now it's working, no errors, but "/push: player not found"
  5. h4x7o0r

    Push script

    sorry but no change , same errors
  6. h4x7o0r

    Push script

    For sure. for example for [XYZ]ABC42 i use : /push abc .
  7. h4x7o0r

    Push script

    Warning - Bad argument @ 'getPlayerFromName' expected script at argument 1, got nil Error - Bad argument #2 to 'find' (string expected, got nil)
  8. h4x7o0r

    Push script

    Thank you very much guys, but it looks like's not working. GTX - I don't have any error just a public message "/push: player not found" so the player wasn't found. Al3grab - error line 3 - attempt to call global "hasObjectPermissionTo" (a nil value) I appreciate your help. LE: thank you solidsnake14 - (same like gtx) no errors but it says "/push: player not found" .
  9. h4x7o0r

    Push script

    Hi guys, I have a "push" script that works just for the player who use it .I wanna change it somehow that only admins be able to push online players. Then i wanna integrate it into a GUI (maybe when i press "N" for example, the panel will be shown) that i can select a player from a list of active players and then to have a "PUSH" button . Here is the my script : function push () player=getLocalPlayer() -- I think i need to modify something if isPedInVehicle(player) then local vehicle=getPedOccupiedVehicle(player) x,y,z=getElementVelocity(vehicle) setElementVelocity ( vehicle, x, y, z+0.25) end end addCommandHandler ( "push", push, true) I know that i need to find the "target" player and also i need this : function findPlayer(name) if not name then return false end local name = name:lower() for i, p in ipairs(getElementsByType("player")) do local fullname = getPlayerName(p):lower() if string.find(fullname:gsub("#%x%x%x%x%x%x", ""), name, 1, true) then return p end end return false end How can i put all togheter ?
  10. Thanks for your reply guys, yeah i know that i can modify using dff /txd but that's no good for players because they need to download some huge packs of data when they come for the first time.
  11. Is there any paintjob for cheetah, turismo, infernus ?
  12. Now everything's fine. Thank you very much.
  13. h4x7o0r

    buymap

    Yes you are right, but first time when i tried micro's code posted the suggested maps appeared. Now i don't know why it doesn't show. Thank you very much for all your help, i really appreciate it.
  14. Line 29 : Bad Argument @ 'engineApplyShaderToWorldTexture' . [Expected material at argument 1, got boolean]
  15. h4x7o0r

    buymap

    And if i want to show maps found with like player type /bm air , the suggested maps that contains "air" are: FOUND 3 : Aircraft DM, Aircraft strike DM, Air 3 DM.
  16. Hey all , i want to make a toggle for water shader ( E.g When i press "K" button to turns the shader on / off ). Here is the code : toggle = false function water() -- Version check if getVersion ().sortable < "1.1.0" then outputChatBox( "Resource is not compatible with this client." ) return end -- Create shader local myShader, tec = dxCreateShader ( "water.fx" ) if not myShader then outputChatBox( "Could not create shader. Please use debugscript 3" ) else outputChatBox( "Using technique " .. tec ) -- Set textures local textureVol = dxCreateTexture ( "images/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "images/cube_env256.dds" ); dxSetShaderValue ( myShader, "microflakeNMapVol_Tex", textureVol ); dxSetShaderValue ( myShader, "showroomMapCube_Tex", textureCube ); -- Apply to global txd 13 engineApplyShaderToWorldTexture ( myShader, "waterclear256" ) -- Update water color incase it gets changed by persons unknown setTimer( function() if myShader then local r,g,b,a = getWaterColor() dxSetShaderValue ( myShader, "gWaterColor", r/255, g/255, b/255, a/255 ); end end ,100,0 ) end end addCommandHandler("water", water) Where should i put the "if statement for the toggle" and bind button
  17. h4x7o0r

    buymap

    Now it's perfect. Thank you for your help man. PS : yeah my bad
  18. h4x7o0r

    buymap

    Thank you again solid, the script now it works fine but it doesn't decrease the money (from 10000 - 3500 = 7500).
  19. h4x7o0r

    buymap

    ty but i don't know what and where should i modify ?
  20. h4x7o0r

    buymap

    Hmm i've tried to modify this script to work with race_starter_pack's money but there are some errors local money1 = tostring(getElementData(localPlayer,"Money")) function buyMap(player, command, ...) if g_ForcedNextMap then outputChatBox( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) return end local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputChatBox( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputChatBox( 'Next map is not set', player, 255, 0, 0 ) end return end local map = findMap(query) if not map then outputChatBox(errormsg, player) return end if(money1 > 3499) then if lastmap_B == map then outputChatBox( 'That map has been played too much recently.', player, 255, 0, 0 ) else g_ForcedNextMap = map outputChatBox(getPlayerName(player).. " bought map '" ..getMapName(g_ForcedNextMap).. "' for $3500. (/bm)", g_Root, 0, 240, 0) givePlayerMoney(player, -3500) setElementData(player, "Money", money1) lastmap_B = g_ForcedNextMap end else outputChatBox("You don't have enough money. ($3500)", player, 255, 0, 0) end end addCommandHandler('bm', buyMap) addCommandHandler('buymap', buyMap) line 22 : attempt to compare number with string
  21. Same with "money" (actually i've tried before post ) LE: Now it works well. Thank you Solidsnake14 . getElementData(localPlayer,"Money")
  22. I've tried and now it returns "false"
  23. I've test it and it worked. But i want to use the money from race_starter_pack. Hmm, i've opened the "registry.db" and it looks like money are in the MoneyB table, under Money field. When i press TAB under the Money column it shows correct value. How can i make getPlayerMoney(thePlayer) has that money ?
  24. Does anyone know why it shows me 0 money ? I'm using Race Starter Pack and money is generated from roll/spin/wins.
  25. Awesome! It works like a charm. That's what I've wanted. Thank you very much. LE: I've also added another else if for "Play again" if option:find("DD", 1, true) then guiLabelSetColor(optionLabels[index], 255, 0, 0) elseif option:find("DM", 1, true) then guiLabelSetColor(optionLabels[index], 64, 64, 255) elseif option:find("Play again", 1, true) then guiLabelSetColor(optionLabels[index], 0, 255, 0) else guiLabelSetColor(optionLabels[index], layout.option.r, layout.option.g, layout.option.b) end
×
×
  • Create New...