Jump to content

ForLaXPy

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by ForLaXPy

  1. that's really helpful man thnx for sharing it , As well the auto completion in JR10's files wasnt working for me idk the reason but those worked and as well as you saids the color are beter and the scripts are clear , once again thnx for that I really Appreciate it
  2. Well the current ways to protect scripts are compiling and by using some function like deleteFile () and sometricks using functions and i dont think so that any one can bypass those stuffs he should be expert to do and even if he is he wont waste his time on such things . Anyway even if they stole the client side if the script already got a server side it will be fine just make Sure that the VPS or whatever you use to store your works is safe and that's it
  3. Well @IIYAMA I tried it and it works for vehicle that in the debug prints : INFO: "onClientWeaponFire" INFO: "hitElement exist" INFO: "hit vehicle" But when i tested it with a player I found this INFO: "onClientWeaponFire" INFO: "hitElement exist" and nothing about hit localplayer also no dmg for them
  4. the Car is shooting Fine but there is no dmg for vehicles or players I tryed to Add this function using your event and still nothing function DamageToPlayersFromCustomWeapons(target) if target == localPlayer then setElementHealth ( target, -5 ) elseif isElement( target ) and getElementType( target ) == "vehicle" then setElementHealth ( target, -10 ) end end addEventHandler("onClientWeaponFire", root, DamageToPlayersFromCustomWeapons)
  5. Well firstly add player varialbe in the function like this LoginHandler (player) and you can replace Lines 2,3,4,5,6,7 with those 2 lines local team = getPlayerTeam(player) if ( getTeamName(team) == "Iron_Miner" ) then
  6. Anyone ? i really need to fix this
  7. Well I recently made a new script that gonna attach some weapon to a specific and i bounded this function to key and evrything was going fine the weapons ae attached to the car and its firing and alls good but the issue is when i try to shoot another player car or i try to damage a player , I cannot do well i think because that function is only called for the client when he press the bind and i was looking arround for something to let that fire dmg the others but i cant find in mta client function wiki that's why I'm seeking for help here local replacementGunKey = "vehicle_fire" function addt() bindKey ( replacementGunKey, "both", fireHydraGuns ) end addEventHandler ( "onClientResourceStart", root, addt) function fireHydraGuns ( key, keyState ) if ( keyState == "down" ) then if ( key == replacementGunKey ) and hydraGuns == true then toggleControl ( replacementGunKey, false ) setWeaponState(hydraGunL, "firing") setWeaponState(hydraGunR, "firing") fireWeapon(hydraGunL) fireWeapon(hydraGunR) setWeaponProperty(hydraGunL, "fire_rotation", 10, 4, 0) setWeaponProperty(hydraGunR, "fire_rotation", 10, 4, 0) end end if ( keyState == "up" ) then if ( key == replacementGunKey ) or hydraGuns == false then setWeaponState(hydraGunL, "ready") setWeaponState(hydraGunR, "ready") toggleControl ( replacementGunKey, true ) end end end
  8. well Actualy we removed them and the command is working fine but when we try to trigger it in the client Gui it wont work . idk what's really the isue there
  9. Well today i made a script too when i was trying to create some peds then i noticed that when i start the script My FPS drops from 40 to 16 -11 it was really strange i tought i had a probleme idk I just wanted to informe you that i got the same issue .
  10. Well Fristly Sorry because My request wont meet the forum rules as this is a script of one of my friends he sent me some scresnshot so i cant post the code here , Sorry for that so yeah here are the things The function with the command under server side
  11. Well it wont work bec the script got a mistake here : Player = getLocalPlayer() it should be warpPedIntoVehicle ( Player, Rekka ) you should be carefull for caps and stuffs
  12. its simple if you want to stop the sound make a function of it and use a command handler function stopMySound() stopSound( thesound ) end addCommandHandler ( "stops", stopMySound )
  13. Well as you said that you network is fine and the others server are good then i would say that the probleme is from the server maybe the location is very far than you and this makes your ping hight and maybe the server got a script that auto kick those who got hight ping or something idk , the solution is try to use a vpn or if that server got a form or any thing try to contact the server support they may fix with you this issue .
  14. mta sa is just a software tat allow you to connect to the server to meat another players , its fully based on GTA sa maps , objects evrything , so you can play mta sa without gta sa already installed in your pc
  15. ye this is client sided as you can see in the events , but you can use addEventHandler( "onMarkerHit", . instread of addEventHandler("onClientMarkerHit", you will ned to use : getElementType( hitElement ) too
  16. Try to merge those functions with your script local isWithinMarker = false local marker = createMarker(x, y, z, "cylinder") --The Marker addEventHandler("onClientMarkerHit", marker, function(player, sameDimension) if player == localPlayer and sameDimension then isWithinMarker = true end end) addEventHandler("onClientMarkerLeave", marker, function(player, sameDimension) if player == localPlayer and sameDimension then isWithinMarker = false end end) bindKey("k", "down", function() if isWithinMarker then guiSetVisible(ammugui,true) showCursor(true) end end)
  17. Omg This is Really A good Work Bro , I really appreciate it
  18. ForLaXPy

    [HELP]

    make sure that's in the meta file its server sided as if its client sided it wont work
  19. Well My probleme is About a GUI that I was creating , Well to be Clear with you guys This is about some chatboxes interface I made my chat list on a table called "sometabs" then I Added a Grid list to show each Tab chat logs and some others features but later I decided to Add a Grid List on the Left that will allow players to switch between Chatboxes Tabs But I dont Really Now what is the function that i should use I found the even onClientGUIClick but how I will call the tabs once the player click on a row of the grid List , anyway Here is a quick Screnshot of the GUI : http://imgur.com/uP1SHc3 and here is the Code : local rx, ry = guiGetScreenSize() local eventDim = 336 local local_chat_range = 90 local chatspam = {["main"]=getTickCount(), ["main2"]=""} local sometabs = {"Support", "Contact Admin", "Main", "Team", "Local", "Group", "Alliance", "Chat", "All", "Kills", "Trading"} local tabs = {} local cboxt = {} function onClientStart() -- Load XML file rootXMLNode = xmlLoadFile("@chat.xml") if (not rootXMLNode) then rootXMLNode = xmlCreateFile("@chat.xml", "settings") end nodeValue = xmlNodeGetValue(rootXMLNode) chatwin = guiCreateWindow((rx/2)-400, (ry/2)-300, 800, 600, "Chat Interface", false) addEventHandler("onClientResourceStop", resourceRoot, function() if (guiGetVisible(chatwin)) then showCursor(false) end end) guiSetVisible(chatwin, false) guiSetAlpha(chatwin, 0.95) guiWindowSetSizable(chatwin, false) tabpanel = guiCreateTabPanel(9, 23, 622 + 159, 430 + 136, false, chatwin) for index, tab in pairs(sometabs) do local main = guiCreateTab(tab, tabpanel) local edit = guiCreateEdit(5, 350 + 136, 540 + 159, 30, "", false, main) local send = guiCreateButton(548 + 159, 350 + 136, 68, 30, "Close", false, main) local cbox = guiCreateCheckBox(6, 384 + 136, 120, 20, "Show in Chatbox", false, false, main) local beep = guiCreateCheckBox(146, 384 + 136, 120, 20, "Beep on Message", false, false, main) local grid = guiCreateGridList(190, 7, 581, 469, false, main) local spawnScreenGridList = guiCreateGridList(6, 9, 174, 467, false, main) guiGridListAddColumn ( spawnScreenGridList, "Chatboxs ", 0.8 ) for key,tab2 in pairs(sometabs) do local row = guiGridListAddRow ( spawnScreenGridList ) --get our new row guiGridListSetItemText ( spawnScreenGridList, row, 1, tab2, false, false ) end guiGridListSetSortingEnabled(grid, false) addEventHandler("onClientGUIAccepted", edit, chatSend) local tab = string.lower(tab) if (string.find(nodeValue, tab)) then guiCheckBoxSetSelected(cbox, true) end addEventHandler("onClientGUIClick", cbox, function() if (guiCheckBoxGetSelected(source)) then nodeValue = nodeValue..";"..cboxt[source]..";" else nodeValue = string.gsub(nodeValue, ";"..cboxt[source]..";", "") end xmlNodeSetValue(rootXMLNode, nodeValue) xmlSaveFile(rootXMLNode) end, false) cboxt[cbox] = tab local label = guiCreateLabel(280, 386 + 136, 250, 20, "Use /"..tab.." message for use in chat box", false, main) tabs[tab] = {main, edit, send, grid, cbox, beep, label} addEventHandler("onClientGUIClick", send, function() guiSetVisible(chatwin, false) showCursor(false) end, false) guiGridListAddColumn(grid, "Time", 0.13) guiGridListAddColumn(grid, "Name and Message", 0.85) guiGridListAddRow(grid) guiGridListSetItemText(grid, 1, 1, "", false, false) addCommandHandler(tab, function(cmd, ...) if (getElementData(localPlayer, "o") ~= "Banned") then local edit, grid, cbox, beep = getEditBoxAndGridFromName(cmd) guiSetText(edit, table.concat({...}, " ")) chatSend(edit) end end, false) end end addEventHandler("onClientResourceStart", resourceRoot, onClientStart)
×
×
  • Create New...