Jump to content

Mann56

Members
  • Posts

    306
  • Joined

  • Last visited

Everything posted by Mann56

  1. Use dxDrawMaterialLine3D to draw a screen like for theatre, you can screen your video there To get a video from internet try the browser functions...
  2. Mann56

    SWAT turret

    Its Possible To Make It But Theres A Problem When S.W.A.T Shoots Theres Water And It Can't Be Stop! how can i turn this into only SWAT though? function shootProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) -- Only create projectile if we are inside a vehicle if(vehicle)then if getVehicleModelFromName(vehicle) == 601 then local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) end end end bindKey("vehicle_fire", "down", shootProjectile)
  3. Ah c'mon man, this script is using in race gamemode with custom cash system. So cash saved on player's account. ON TOPIC: Please give handler of onPlayerBetWin function. Maybe there is error with addEventHandler. Ah, my bad....
  4. He used in all setAccountData so why givePlayerMoney? and setAccountData data is saved in account. Set Account Data wont increase his money you can use it just to store things.
  5. Instead of setAccountData(account,"cash",playerCash+betAmount+betAmount*2) You can just use givePlayerMoney(thePlayer,playerCash+betAmount+betAmount*2)
  6. Get Element Data returns : "This function returns a variable containing the requested element data, or false if the element or the element data does not exist. When getting data corresponding to a XML attribute, this is always a string." It doesn't return an element , and also it is returning false; so when you use destroyElement boolean "false" is supplied not the element.
  7. Is the picture appearing? Any debug errors? And also.. Use a table to store the skin names and then loop it.. It'll be easier for you afterwards to edit it than setting a unique guiGridListSetItemText everytime.
  8. Well, i had a similar problem before a number of times, dunno if this is like it but sometimes marker gets little down, to trigger it try increasing the z co-ordinate by 0.1 , it worked for me, i spent hours on this issue and the solution was very easy lol.
  9. Shaders deal with HLSL afaik, i personally have no knowledge of HLSL, but you can edit skins in 3ds max and textures in PS.
  10. Instead of giving admin directly you can use aclrequest in your console aclrequest allow Ammunition all I strongly disrecommend you to give admin to resources. Give that to only selected resources.
  11. Great work! But don't you think you are rotating the camera too much? Also, it'd be better that instead of rotating the camera and taking it back to the same point, you can take it to another point, and make a panorama . I hope you get what i mean.
  12. Mann56

    dxButton

    Ah, Thanks a lot , it works!!!! didn't knew about isMouseInPosition.... Thanks for it Regards, Mann
  13. Ah i forgot the tostring() Btw dude, i think he has set variable account with name and not lastname
  14. dbExec(db, "UPDATE banking SET lastname=? WHERE name=? ", lastname, account)
  15. Mann56

    dxButton

    Thanks, So if i am right, i can use a onClientClick and check if the cursor was clicked in the designated area and so output the function? EDIT: Can you explain the second method of ahover button to me? I made a onClientClick and got the position of cursor using getCursorPosition, but how'd i check if the cursor is in a particular space without using gui buttons ?
  16. Mann56

    dxButton

    Hey guys, I was making a dxButton for my resource, but i have no idea how to get it clicked. I mean : I have a dxRectangle, then i can change the colour of the rectangle a bit when a players hovers his mouse over it, but how can i get his click on the dxButton, i want the button to function as a normal gui button works... Thanks for reading, Regards, Mann
  17. Mann56

    Solved...

    Agree with what Karim said, first you bindKey on the event "onPickupHit" and then make a custom event and get distance between two points , if distance exceeds by 4 or 5 then unbind the key , so the key will be bound till the player is near the pickup
  18. Since you don't know lua , you should not do this... To add backpacks, you'll need to edit a reasonable part of code, i suggest you to hire a scripter instead as without knowing lua, changing the code can mess your server...
  19. You have put in hard work for the resource, especially the neon part Great job dude!!
  20. Mann56

    SAM Turrent

    Did you just copy the thing out of wiki? You don't need either to input the datatypes nor the optional arguments... see the examples in the wiki, A sample projectile can be like this... createProjectile(localPlayer,20 ,posX,posY,posZ,1.0,localPlayer) --For the sake of simplicity i removed other optional arguments -- it works in this way : --createProjectile( creator of projectile, the weapon id it'd represent,now optional arguments[ the three position cords,force of projectile,the target (has to be a player)] I recommend you to have a look at Basic scripting tutorial by MadeX before proceeding with scripting.
  21. As bonus said just add the skin's at the time player spawns Client addEvent("OnLogin", true) function onPlayerLogin() window = guiCreateWindow(321, 153, 538, 441, "L4D: Spawn Manager", false) guiWindowSetSizable(window, false) guiSetAlpha(window, 1.00) label = guiCreateLabel(11, 25, 716, 19, "Select a spawn location and a skin.", false, window) gridlist = guiCreateGridList(10, 54, 519, 327, false, window) spawn_column = guiGridListAddColumn(gridlist, "Location", 0.9) for i = 1, 2 do guiGridListAddRow(gridlist) end guiGridListSetItemText(gridlist, 0, 1, "Pershing Square", false, false) guiGridListSetItemText(gridlist, 1, 1, "Idlewood Gas Station", false, false) btn_spawn = guiCreateButton(10, 391, 131, 35, "Spawn", false, window) label_tip = guiCreateLabel(151, 401, 300, 15, "Tip: You MUST choose a skin and a location to spawn.", false, window) guiSetFont(label_tip, "default-bold-small") skin_window = guiCreateWindow(857, 153, 201, 441, "Skin", false) guiWindowSetSizable(skin_window, false) guiSetAlpha(skin_window, 1.00) skin_gridlist = guiCreateGridList(9, 53, 182, 327, false, skin_window) skin_column = guiGridListAddColumn(skin_gridlist, "Skin", 0.9) for i = 1, 2 do guiGridListAddRow(skin_gridlist) end guiGridListSetItemText(skin_gridlist, 0, 1, "CJ", false, false) guiGridListSetItemText(skin_gridlist, 1, 1, "Test", false, false) showCursor(true) end addEventHandler("OnLogin", root, onPlayerLogin) function onClickButtonSpawn() if (source == btn_spawn) then local row_spawn = guiGridListGetSelectedItem( gridlist ) local name_spawn = guiGridListGetItemText( gridlist , row_spawn, spawn_column) local row_skin = guiGridListGetSelectedItem( skin_gridlist ) local name_skin = guiGridListGetItemText( skin_gridlist , row_skin, skin_column) if name_spawn == "Pershing Square" then triggerServerEvent("SpawnPlayer_PershingSquare", localPlayer,name_skin) guiSetVisible(window, false) guiSetVisible(skin_window, false) end if name_spawn == "Idlewood Gas Station" then triggerServerEvent("SpawnPlayer_IGS", localPlayer,name_skin) guiSetVisible(window, false) guiSetVisible(skin_window, false) end end end addEventHandler("onClientGUIClick", root, onClickButtonSpawn) Server addEvent("SpawnPlayer_PershingSquare", true) addEvent("SpawnPlayer_IGS", true) local PershingSquare_spawnX, PershingSquare_spawnY, PershingSquare_spawnZ = 1536.2517089844, -1683.3726806641, 13.546875 function joinHandler_PershingSquare(name_skin) if name_skin == "CJ" then spawnPlayer(source, PershingSquare_spawnX, PershingSquare_spawnY, PershingSquare_spawnZ,0,0) fadeCamera(source, true) setCameraTarget(source, source) else spawnPlayer(source, PershingSquare_spawnX, PershingSquare_spawnY, PershingSquare_spawnZ,0,20) fadeCamera(source, true) setCameraTarget(source, source) end end addEventHandler("SpawnPlayer_PershingSquare", getRootElement(), joinHandler_PershingSquare) local IGS_spawnX, IGS_spawnY, IGS_spawnZ = 1959.55, -1714.46, 10 function joinHandler_IGS(name_skin) if name_skin == "CJ" then spawnPlayer(source, IGS_spawnX, IGS_spawnY, IGS_spawnZ,0,0) fadeCamera(source, true) setCameraTarget(source, source) else spawnPlayer(source, IGS_spawnX, IGS_spawnY, IGS_spawnZ,0,20) fadeCamera(source, true) setCameraTarget(source, source) end end addEventHandler("SpawnPlayer_IGS", getRootElement(), joinHandler_IGS) function onLogin() triggerClientEvent(source, "OnLogin", source) end addEventHandler("onPlayerLogin", root, onLogin) function hideCursor() showCursor(source, false) end addEventHandler("onPlayerSpawn", root, hideCursor) I just added argument name_skin in the triggers and the skin id would be as mentioned in spawnPlayer. Hope it helps...
  22. Mann56

    SAM Turrent

    createColSphere For all server functions : Click here Server Events : Click Here Client Functions : Click Here Client Events : Click Here So you won't have to ask for functions to others and can find them yourself. or simply Link to Wiki's homepage
  23. Mann56

    SAM Turrent

    lol i didnt ask anyone to make a script i just want him to make it in a code so it wont be so messy. if you dont wanna help dont post. Asking for code is indirectly asking to script. If you really want to learn, go to the wiki,see what functions can be used for your resource, still don't get any idea? Go to the community and see if you can find a script which you want and lokk what the developer used in it. Creating Sam turret is easy, you need to make a colhape( i prefer colSphere) and use createWeapon, setWeaponTarget, fireWeapon as bonus said or you can use createProjectile. But if you use createProjectile, be sure the creator is either localPlayer or his vehicle , check out wiki for more!
×
×
  • Create New...