Szerző Téma: Bolt rablas  (Megtekintve 660 alkalommal)

Bolt rablas
« Dátum: 2015. Március 03. - 20:26:28 »
0
sziasztok az lenne a kerdesem hogy mi lehet a baj a triggelesel atadok egy adatot de a szerveroldalon nem mukodik mi lehet a baja ?
Kliens :
 

local ped= createPed(0,0,0,3)
setElementData(ped,\"is:Ped\",true)
function becelozta()
    if not getControlState ( \"aim_weapon\" ) then return end
    local weaponType = getPedWeapon ( getLocalPlayer() )
    if (weaponType > 9) and (weaponType < 33) then
      element = getPedTarget ( getLocalPlayer() )
       local px,py,pz = getElementPosition(element)
        local x,y,z = getElementPosition(getLocalPlayer())
        if getDistanceBetweenPoints3D ( px, py, pz, x, y, z ) <= 5 then
         if(getElementType(element)==\"ped\") then
           if getElementData(element,\"is:Ped\")==true then
         
           triggerServerEvent(\"onRob\",resourceRoot,element)
           
            end
          end
        end
    end
end
addEventHandler( \"onClientRender\", getRootElement(), becelozta )

 
szerver :
 

 

function getCelozvaBoltrablas (element)
      outputChatBox(\"Szerver oldal bartos\")
      setPedAnimation( element, \"ped\", \"handsup\", -1, false, false, false)
       
end
addEvent(\"onRob\", true)
addEventHandler(\"onRob\",resourceRoot,getCelozvaBoltrablas)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal