GTA Közösség - A magyar GTA fórum

Multi Theft Auto (MTA) => MTA: Szerverfejlesztés => Archívum => A témát indította: asdpudingasd - 2014. június 24. - 11:48:47

Cím: Carshop-system gond
Írta: asdpudingasd - 2014. június 24. - 11:48:47
Hello! Az a gondom támadt , hogy a szerveren a Kocsi boltba bemegyek mindent előhozz és Amikor megvenném ezt írja: \"Neked túl sok kocsid van \" Vagy ezt: \" Neked nem lehet több kocsid \". Pedig egy kocsim sincs. Légyszíves segítsetek
Cím: Carshop-system gond
Írta: Martin - 2014. június 24. - 11:53:50
Hali. Nekem is ez volt a probléma Total Life-on, és a megoldás a \'global\' mappában van. Add meg a skypeod és segítek.
Cím: Carshop-system gond
Írta: Exmine - 2014. június 24. - 15:50:17
Minek ide skype. Megoldás egy alapvető kész modból. itt tekintek ZeroMTA-ra akár. átmásolod a c_vehicle és az s_vehicle globalst
c_vehicle_globals
 
local factor = 1.5
function relateVelocity(speed)
return factor * speed
end
function getVehicleVelocity(vehicle)
speedx, speedy, speedz = getElementVelocity (vehicle)
return relateVelocity((speedx^2 + speedy^2 + speedz^2)^(0.5)*100)
end

 
s_vehicle_globals
 
function getVehiclesOwnedByCharacter(thePlayer)
local dbid = tonumber(getElementData(thePlayer, \"dbid\"))
local carids = { }
local numcars = 0
local indexcars = 1
for key, value in ipairs(exports.pool:getPoolElementsByType(\"vehicle\")) do
local owner = tonumber(getElementData(value, \"owner\"))
if (owner) and (owner==dbid) then
   local id = getElementData(value, \"dbid\")
   carids[numcars+1] = id
   numcars = numcars + 1
end
end
return numcars, carids
end
function canPlayerBuyVehicle(thePlayer)
if (isElement(thePlayer)) then
if getElementData(thePlayer, \"loggedin\") == 1 then
   local maxvehicles = getElementData(thePlayer, \"maxvehicles\") or 0
   local novehicles, veharray = getVehiclesOwnedByCharacter(thePlayer)
   if (novehicles < maxvehicles) then
      return true
   end
   return false, \"Túl sok jármű\"
end
return false, \"Játékos nincs bejelentkezve\"
end
return false, \"Element not found\"
end
Cím: Carshop-system gond
Írta: asdpudingasd - 2014. június 26. - 11:46:57
De nem találok s_vehicle_global-t se c_vehicle_global-t
Cím: Carshop-system gond
Írta: Carlos - 2014. június 26. - 14:08:15
Ezért csinálj egyet...
Cím: Carshop-system gond
Írta: asdpudingasd - 2014. június 27. - 00:20:05
ZeroMTA mód.
Cím: Carshop-system gond
Írta: Carlos - 2014. június 27. - 06:58:33
Attól még nincsen global-ja az autóknak...
Cím: Carshop-system gond
Írta: kundlam - 2014. június 29. - 17:28:20
Carlos, nekem van global, de sajnos kula és nemjó, nemjók tőlük a parancsok. Ezt bemásoltam ami ittvan de kifagy
Cím: Carshop-system gond
Írta: Legend - 2014. július 25. - 17:25:34
[admin]Elég rég nem érkezett már hozzászólás, így zárom.[/admin]