Jump to content

Soldier666

Members
  • Posts

    21
  • Joined

  • Last visited

Soldier666's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. Hello world. Since I am still newbie in scripting I wanted to ask someone, how can I work correctly with the guiCreateLabel and DxDrawImage ? The problem is that If people has different resolutions, they see the text and image in different places, not the same.. Can anyone please help me to learn how to work with gui and dx that resolution doesnt metter?
  2. Okay so I am trying to make an resource that works with mysql database till now everything works but when the mysql table is updated, server doesnt catch that. To see the changes I have to restart the main resource by admin command /restart res, but that's not what I need. Does anyone know hot to fix that? I have a php file where ppl input text in the box and presses Submit, then the mysql table has been updated with some information, but in game it only show's when the resource is restarted. I need somehow do it to make it reload the row which has been updated in mysql automatically on Submit click.. Ehh I hope u got the idea.
  3. Hello, as I am newbie in Lua scripting then I am coming here with dumb questions.. heh So I hope somebody will help me. I downloaded this free resource - https://community.multitheftauto.com/ind ... ls&id=6359 And it works just great, but I wanted to upgrade it a bit, since it's Roleplay server. I want player to wait for car washing, for about 30 secounds. Also I need that server takes 50$ from his money. And If he doesnt have that much money, server tells to earn some cash and to come back It's really easy and for those who dont want to download the code, here it is - Oah and if it's possible then add some time when the car gets dirty otherwise it becames dirty after 3 or 5minutes after car wash. That 's too quick. server.lua function onserver ( ) fadeCamera ( source, false, 2.5, 0, 0, 0 ) setTimer ( fadeCamera, 2500, 1, source, true, 2.5) outputChatBox ( "Your Welcome in Wash Car", source, 0, 255, 255, true ) end addEvent("onserver",true) addEventHandler("onserver", root, onserver) client.lua myShader = dxCreateShader( "texture.fx" ) local x,y,z = 1911.2,-1776,12 local Marker = createMarker ( x, y, z, "cylinder", 5, 255, 0, 0, 150 ) local blip = exports.customblips:createCustomBlip ( x, y, 20, 20, "icon.png" ) local gate = createObject(968, 1915.5, -1771.80, 13, 0, -90) local gate1 = createObject(968, 1915.5, -1780.85, 16, 0, -90) function cleancar (hitPlayer, matchingDimension) local theVehicle = getPlayerOccupiedVehicle ( hitPlayer ) if ( theVehicle ) then engineApplyShaderToWorldTexture( myShader, "vehiclegrunge256", theVehicle ) engineApplyShaderToWorldTexture( myShader, "?emap*", theVehicle ) triggerServerEvent ("onserver", hitPlayer, onserver) moveObject(gate, 9000, 1915.5, -1771.80, 16) moveObject(gate1, 2000, 1915.5, -1780.85, 13) end end addEventHandler("onClientMarkerHit", Marker, cleancar) function moveBack() moveObject(gate, 2000, 1915.5, -1771.80, 13) moveObject(gate1, 9000, 1915.5, -1780.85, 16) end addEventHandler("onClientMarkerLeave", Marker, moveBack)
  4. Sorry Cant do it ;( can someone else try to help me with this?
  5. Hello world. Can anybody explain me how to do a script that attaches Briefcase on player's hand when he has more than 10k on hand? I am talking about RolePlay GM.. Can someone give me some base script or smth? Or help me with the idea itself. ( How it should be scrippted. ) Thanks
  6. Hi. Can anyone help me please? I deleted object in my MAP EDITOR, and when I start server, it's OK ( the object is gone ) but when I relog into the server, the object is visible again. Actually HALF of the object. What's the problem? I tried also remove it with world object resource, but the same. Other objects deletes fine, also when I relog they are not visible, but this one keeps showing ... why?
  7. Okay but how does it work? if math.random( 1, 2 ) == 1 then here goest the script AND how to call IF NOT 1? smth like if math.random( 1, 2 ) == 1 then here goest the script else the action if it's not 1.. But I've tried it and it doesnt work properly.. maybe because my if math.random is already in another IF ..?
  8. Okay but how does it work? EDIT:Sorry for DB, smth messed up
  9. Hello everyone , I need someone to explain me how to correctly use if math.random Please someone just build me a base structure of this
  10. Yes. Well. I do save them but when I restart my server everything is lost.
  11. OK, got it. works. But how can I add those handlings to my server? They are gone after car respawn.
  12. Sorry for BUMPING but with which button I can open this menu IG? Or is there any command?
  13. Thank you. Works. ! You helped me a lot.
  14. Hi, I am trying to delete / remove object that's in server. I do it like this - function start() removeWorldModel(968, 200, -1526.4375, 481.38281, 6.90625, 0) removeWorldModel(966, 200, -1526.39062, 481.38281, 6.17969, 0) removeWorldModel(10829, 200, -1523.2578125, 486.796875, 6.15625, 0) end addEventHandler("onResourceStart", getResourceRootElement(), start) And the thing is, when I first save it, the object deletes. BUT then when I relog in the server, its again back there. If I restart this resource, than again they dissapear. And again, if I relog they are visible. What's the reason?
  15. Hi everybody, I am searching for any interior that looks like hospital. I've tried to search here and google but nothing much.. Please help me If you know where to get them
×
×
  • Create New...