Jump to content

botshara

Members
  • Posts

    83
  • Joined

  • Last visited

Posts posted by botshara

  1. Check this:
    function handleVehicleDamage(_, weapon, _, _, _, _, _) 
        if ( weapon == 0 ) then -- If the weapon == fist then 
            cancelEvent( ) 
        end 
    end 
    addEventHandler("onClientVehicleDamage", root, handleVehicleDamage) 
    

    Nop, I have this script, with this cant damage car physically (when black smokes go out from motor and cant start motor), but I want make script which cant damage car visually when hitting by hand. Works like anti-DM script for roleplay server

  2. function fixVehiclea() 
    fixVehicle(source) 
    end 
      
    addEventHandler("onVehicleDamage", getRootElement(), fixVehiclea) 
    

    not good soloution if vehicle is damaged its fix it fully

  3.   
            function myFunction($charactername, $hours) { 
            if($hours >= -1) { 
            $MY_SERVER = [ 
                "host" => "89.53.89.145/resources",        #The host/IP of your MTA server 
                "http_port" => 80,         #The HTTP port for your MTA server (Default 22005) 
                "http_user" => "mta_php_sdk", #The username that we created in the previous step 
                "http_pass" => "xxxxxx"     #The password for the username that we created 
            ];   
            $SERVER = new mta ( $MY_SERVER['host'], $MY_SERVER['http_port'], $MY_SERVER['http_user'], $MY_SERVER['http_pass'] );     
                $RESOURCE = $SERVER->getResource ( "mta_php" );        
                $RESOURCE->call ( "myFunction", $charactername ); 
      
      
    

    All worked fine, when was 22005 port and when was enabled mta http server. But now doesnt connect to server, because doesnt showing that user is trying to logging (in console)

  4. Why did you change the port to 80? Why did you disable the httpserver? What sdk are you using (php, javascript)? did it work before?

    Because 80 port is default for my apache, I disabled it because need download from my apache http server not from mta httpserver on the basis mta httpserver lagging my server.

    Im using php mta SDK

  5. Hello, I have a problem with MTA SDK, i disabled mta httpserver

    0

    and make it download from url myip/resources , all works fine, but from website cant connect to server (user doesnt connect to server, nothing in server logs showing)

    I also changed port in my php script to 80, but nothing

  6. Hello guys, it is possible make a radio which can play sounds from your GTA folder, I know that there is radio channel who do that, but i want activate only this channel

  7. You have to check is the player who hit the marker is the local player.

    Try this:

    local startJOB = createMarker ( 2208.328125, -2284.1962890625, 13.764669418335, "cylinder", 1.5, 255, 255, 0, 170 ) 
      
    function startTheJob(hitElement) 
         if (hitElement == localPlayer) then 
             setElementModel(localPlayer, 27) 
             nextMarker = createMarker ( 2230.3369140625, -2283.4921875, 13.391557693481, "cylinder", 1.5, 255, 255, 0, 170 ) 
             addEventHandler ( "onClientMarkerHit", nextMarker, nextStage ) 
             destroyElement(startJOB) 
        end 
    end 
    addEventHandler ( "onClientMarkerHit", startJOB, startTheJob ) 
    

    Now skin changes only for me, the other players didnt see that I changed skin and I didnt see them is changed skin

  8. client-side

    -- HERE WILL BE SCRIPT 
    local startJOB = createMarker ( 2208.328125, -2284.1962890625, 13.764669418335, "cylinder", 1.5, 255, 255, 0, 170 ) 
      
    function startTheJob() 
        setElementModel(getLocalPlayer(), 27) 
        nextMarker = createMarker ( 2230.3369140625, -2283.4921875, 13.391557693481, "cylinder", 1.5, 255, 255, 0, 170 ) 
        addEventHandler ( "onClientMarkerHit", nextMarker, nextStage ) 
        destroyElement(startJOB) 
    end 
    addEventHandler ( "onClientMarkerHit", startJOB, startTheJob ) 
    

    What the fuck, when hit on marker then changes player clothes but the problem is that clothes changes else to players who is nearby at me. Please help to fix this script

  9. Try /debugscript 3 in game, there might be client side error which won't be shown in the server console. If you're using windows 7 or later you may need to right click on the file, choose properties and then unblock (if available) as windows 7 block files downloaded from unknown sources. I'm not sure how Linux deal with that kind of block as I always unblock my files before sending them to the server.

    Nop it doesnt help (unblock) and no one error with debugscript. WTF where is the problem :x

  10. It shouldn't be any difference in the behavior of lua scripts between Windows and Linux. Check these points:

    • Did you copy the same code from Windows to Linux, (i.e do you know the copy you have on Linux actually works)
    • Did you updated permissions and owner? "chmod +x script.lua" and "chown YOUR_USER script.lua".
    • Does the resource start without spawning peds and vehicles or does it not start at all?

    * I downloaded script from my pc (windows) and then upload via ftp on my server

    * I set for all files chmod 777, but nothing changing

    * Resource start but start without spawning peds and vehicles, on my windows server console show that have loaded map in 0.99999 server but on my linux server console doesnt show it, I mean there is the problem.

    Im using Linux Debian 7.7

  11. I have a problem with math.random , it always generate 44! Why ?

    g_shops = { 
    { -- 1 
            name = "Main Shop", 
            description = "The Main Shop Items.", 
             
            { 
                name = "Main", 
                { name = "Lottery Ticket", description = "Lottery Ticket.", price = 10, itemID = 68, itemValue = math.random(2, 48 ) }, 
            }, 
    } 
    

  12. I hope that you understood my idea :D

    Nope, that's surely why no one replied.

    Explain better and tell us why you want to do that (What are these numbers for etc).

    I need it for forsing system. When player click on item then item disappears and insert in column itemID. I dont want make namerous columns because i have vey much items for this reason I need insert all itemID's in one column.

    Why I need export from column itemID's ? Because i want check if the item already exist

×
×
  • Create New...