Jump to content

Spajk

Members
  • Posts

    285
  • Joined

  • Last visited

Everything posted by Spajk

  1. http://www.mediafire.com/?l53q521il35a7qh there you go
  2. Probably wants to download porn to clients!
  3. Try this: client.lua function chooseG() background = guiCreateStaticImage(0, 0, 1, 1, "background.png", true) window = guiCreateStaticImage(0.2, 0.125, 0.6, 0.75, "window.png", true,background) male = guiCreateStaticImage(0.1, 0.125, 0.2, 0.6, "male.png", true,window) female = guiCreateStaticImage(0.7, 0.125, 0.6, 0.75, "female.png", true,window) addEventHandler("onClientGUIClick", male, playerChosen) end function playerChosen() if(source==male)then triggerServerEvent("gender:setGender",localPlayer,1) elseif(source==female)then triggerServerEvent("gender:setGender",localPlayer,0) end destroyElement(background) end addEvent("gender:chooseGender",true) addEventHandler("gender:chooseGender",root,chooseG) server.lua function login(oldacc,acc) local gender = getAccountData(acc,"gender") if(gender~=0 and gender~=1)then triggerClientEvent(source,"gender:chooseGender",source) end end addEventHandler('onPlayerLogin', root, login) function setG(gender) -- 1 = male, 0 = female local acc = getPlayerAccount(source) if(acc)then setAccountData(acc,"gender",gender) end end addEvent("gender:setGender",true) addEventHandler("gender:setGender",root,setG) meta.xml <meta> <script src="server.lua "type="server"/> <script src="client.lua "type="client"/> <file src="background.png"/> <file src="window.png"/> <file src="male.png"/> <file src="female.png"/> </meta> Name your images as: background.png window.png male.png female.png I didnt test it, so I am not sure if it works.
  4. Spajk

    MTA:SA 1.4

    I read that, but the script file is same(script.lua), so how does it know if I am calling a client or server function?
  5. Spajk

    MTA:SA 1.4

    I am intrestred about the "shared" thing, could anyone explain what it does exactly?
  6. Cant you just remove those parts from the script file?
  7. No problem, everyone needs help sometimes.
  8. client.lua file addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() exports.customblips:createCustomBlip ( 1911, -1776, 45, 45, "icon.png") end) meta.xml <meta> <script src="client.lua" type="client" /> <file src="icon.png"/> </meta> that should work
  9. Are you talking about Windows sleep mode?
  10. Don't worry about it too much. The red frame just means you should leave 1px around the edges free, but it's supposed to be hidden when you export to png. ok, thanks
  11. Hello, I am translating Serbian and I have a small problem with Main menu. The problem is that photoshop template has a red frame around it called "Ghosting fix". While the .png image that needs to be translated doesnt, so the problem is that I am not sure if the red frame should or shouldnt be removed.
  12. Thanks for the help, is there any program which could help me to get x,y of the bottom-left corner, width and height of an area inside the image?
  13. I am not sure if I wrote the title right, but I will try to explain more here. I show an image to player via dxDrawImage and thats nice, but I want to do something when player moves his cursor over or clicks on an area inside that image. I know that one of the ways is to get pixel coordinates of the area, then with onClientClick to check if it was clicked by checking area coordinates with screen coordinates. That way would be really hard for me, as my image contains lots of little areas, so my question is, whats the fastest way to make this?
  14. Spajk

    Object gravity

    Well, the title pretty much says it, is there any way to make objects affected by gravity and other physics like vehicles are? I would like to drop an object from the sky and let it fall to ground.
  15. That helped a lot. I searched thru PHP SDK source code and I found that MTA HTTP server uses basic authorization method. With some google-ing, I managed to find a function to get page content. Thanks. function http_auth_get($url,$username,$password){ $cred = sprintf('Authorization: Basic %s',base64_encode("$username:$password") ); $opts = array('http'=>array('method'=>'GET','header'=>$cred)); $ctx = stream_context_create($opts); $handle = fopen ( $url, 'r', false,$ctx); return stream_get_contents($handle);}
  16. This probably isnt the right section, but this is the only place where I think I can get the answer. I created a page on MTA's inbuild HTTP server that changes dynamicly. Now I want to create a PHP script that would get the content of that page. That wouldnt be a problem, but when viewing the page, MTA's http server requiers to login with account's user/pass combination. Is there a way to bypass this authorisation or to make the PHP script actually login with certain user/pass and view(read) the page. Thanks in advance, Spajk.
  17. I want to send screenshots between players. Sending them thru server will cost a lot of bandwich
  18. is there anyway to trigger a client event from another client without server interaction, I need something like triggerClientEvent but for client side, to trigger an event on a specified client.
  19. can u describe it ? what should it do ?
  20. becouse this script is client side ( GUIs )
  21. Spajk

    Well...

    that "boy" is gay
×
×
  • Create New...