Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: kodem
1. p0moc z kodem
https://imgur.com/a/crXVq9N

jak zrobi? aby odlicza?o mi hp jak upadne czerwony pasek schodzil albo jak dodaje pieniadze to zeby pisa?o tyle ile dam sobie ? kod masz tu


[lua]
showPlayerHudComponent("all", false)

addEventHandler("onClientRender", root,
function()
dxDrawImage(1055, 56, 247, 90, ":hude/hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawRectangle(1081, 59, 174, 15, tocolor(0, 254, 60, 255), false)
dxDrawRectangle(1080, 87, 175, 12, tocolor(253, 0, 0, 255), false)
dxDrawRectangle(1080, 111, 175, 9, tocolor(98, 151, 154, 255), false)
dxDrawRectangle(1081, 130, 174, 11, tocolor(254, 254, 254, 255), false)
dxDrawText("ilo?? pieni?dzy-0%", 1084, 62, 1245, 69, tocolor(120, 119, 120, 255), 1.00, "default", "center", "center", false, true, false, false, false)
dxDrawText("ilo?? punkt?w ?ycia-100%", 1083, 89, 1245, 97, tocolor(120, 119, 120, 255), 1.00, "default", "center", "center", false, true, false, false, false)
dxDrawText("posi?ek-0%", 1081, 113, 1251, 116, tocolor(118, 8, 230, 255), 1.00, "default", "center", "center", false, true, false, false, false)
dxDrawText(Nick-(localPlayer), ((1461/1920)*s.x)+1, ((20/1080)*s.y)+1, ((1769/1920)*s.x)+1, ((68/1080)*s.y)+1, tocolor(0, 0, 0, 255), 1.00, font, "right"...
2. P0moc z kodem
[code]addEventHandler("onMarkerHit", getRootElement(), function(hit, md)
if getElementData(source, "cpn") == true then
if not getElementData(hit, "cpn:mapistolet") then
setElementData(hit, "cpn:mialdm", getControlState(hit, "fire"))
giveWeapon(hit, 32, 10, false)
toggleControl(plr,"fire",false)
toggleControl(plr,"aim_weapon",false)
toggleControl(source,"fire",false)
tooggleControl(source,"action",false)
toggleControl(hit,"fire",false)
tooggleControl(hit,"action",false)
setElementData(hit, "cpn:mapistolet", false)
local x, y, z = getElementPosition(source)
setElementData(hit, "cpn:kordyx", x)
setElementData(hit, "cpn:kordyy", y)
setElementData(hit, "cpn:kordyz", z+0.85)
toggleControl(hit, "fire", false)
toggleControl(hit, "aim_weapon", false)
else
takeWeapon(hit, 32)
toggleControl(plr,"fire",true)
toggleControl(plr,"aim_weapon",true)
toggleControl (source,"fire",true)
toggleControl(source,"fire",true)
tooggleControl(source,"action",true)
toggleControl(hit,"...
3. coś nie tak z kodem zabiera 5 żetonów podczas wymiany
Witam mam taki problem ?e jak klikam wymiana i chce wymieni? pkt na premium to mi zabiera 5 ?eton?w i to tak wygl?da jak bym klika? w jeden przycisk 5 razy... pom?g? by kto? to poprawi?? bo walcze z tym juz od 2 dni i nie mog? tego znale??, bardzo bym by? wdzi?czny... pozdrawiam

[lua]elseif mysz(screenW * 0.4008, screenH * 0.6133, screenW * 0.0542, screenH * 0.0352) and okno3 == false and okno4 == true then
elseif mysz(822*px, 585*py, 126*px, 38*py) and gielda == true then
triggerServerEvent("wymien:pp", localPlayer, ile)
if niemozesz == true then return end
local cena = guiGetText(cenapp)
local ilosc = guiGetText(liczbapp)
if not tonumber(ilosc) then return end
if not tonumber(cena) then return end
if cena:len() > 6 then return end
if cena == "Cena" then return end
if ilosc == "Ilosc" then return end
if cena == "" then return end
if ilosc == "" then return end
if tonumber(cena) < 1 then return end
if tonumber(ilosc) < 1 then return end
if string.find(cena, 'E') then return end
if string.find(cena, 'e') then return end
if string.find(cena, 'r') then return end
if tonumber(ilosc) > tonumber(getElementData(localPlayer, "pp")) then exports["smta_base_notifications"]:noti("Nie posiadasz wystarczajacej ilosc DP", "error") return end
triggerServerEvent("wystaw:pp", localPlayer, tonumber(i...
4. Baza Gangu z kodem na adma?
elo da kto? baz? ( map? ) a w niej skrypt ?eby dawa? admina na dany serial? PS. Ma by? pod OGRPG.
5. Kłopot z kodem LUA Frakcje i ACL
Witam od wczoraj mam problem z tym kodem i acl

[lua]cywile = createTeam ("Cywile",255, 255, 255 )
admi = createTeam ("Administracja", 255, 0, 0)
Policja = createTeam ( "Policja", 0, 0, 255 )
ta = createTeam ( "Taxi", 255, 255, 0 )



function logintax ( thePlayer )
if isObjectInACLGroup( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("taxi")) then
setPlayerTeam ( player, ta )
giveWeapon ( player, 12, 1000 )
setPedSkin ( player, 281 )
spawnPlayer ( player, -2660.984453125, 609.30276123047, 14.4575 )
setPlayerNametagColor ( player, 255, 255, 0 )
end
addCommandHandler ( "taxi", logintax )

function wyloguj ( player )
setPlayerTeam (player, cywile)
setPlayerNametagColor (player, 255, 255, 255 )
end
addCommandHandler ("wylogujtaxi", wyloguj)[/lua]

Chodzi o to ?e gdy mam linie z if isObjectInACLGroup nie dzia?a to ?e mog? uzywa? tej komendy osoby tylko zapisane w acl (KOD w ACL)
[code]<group name="taxi">
<acl name="Default"></acl>
<object name="user.czak"></object>
</group>[/code]
To wy?wietla si? w konsoli MTA przy w??czaniu skryptu

[code]SCRIPT ERROR: pogoteampogo.lua:25: 'end' expected (to close 'function' at line 8) near '<eof>'
[11:57:23] ERROR: Loading script failed: pogoteampogo.lua:25: 'end' expected (to close 'function' ...
6. Problem z kodem w meta.xml lub konsoli
Siemanko chcia?em zapyta? o co tutaj chodzi bo zrobi?em wszystko dobrze w bramie a gdy chce j? w??czy? wyskakuje na konsoli:
[2015-02-15 17] ERROR: Couldn't find meta.xml file for resource 'brama'
[2015-02-15 17] Loading of resource 'brama' failed
Kod:

<meta>
<info author="MatXpl" name="brama" version="1.0.1" type="script"/>
<script src="BRAMACR.lua"/>
</meta>

A tutaj od bramy

Kod:




BAZACR = createObject ( 2957, 2491.1999511719, 2350.6999511719, 11.39999961853 )

function opBAZACR()

moveObject (BAZACR, 3500, 2491.1999511719, 2350.6999511719, 11.39999961853 )
end

addCommandHandler("opBAZACR", opBAZACR)

function clBAZACR()

moveObject (BAZACR, 3500, 2481.3999023438, 2350.6999511719, 11.39999961853 )
end

addCommandHandler("clBAZACR", clBAZACR)