Witam mam suszark? lecz nie dzia?a dobrze mam te? DB
[code]ERROR: Client (|MistrzAFK|sebik2303) tiggered serverside event onPokazChatMierzenie, but event is not added serverside[/code]
to by? 1 a 2
[code]ERROR: Client (|MistrzAFK|sebik2303) tiggered serverside event onWystawMandat_Suszarka, but event is not added serverside[/code]
O co z tym chodzi ?
Dam kod :
[lua]
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize ()
vehicle=nil
najwyzsza=0
dop="n/a"
rejstrator=false
moznamierzyc=true
function seter()
moznamierzyc=true
tekst="Oczekuje na pomiar..."
end
function isPlayerInTeam( thePlayer, teamName )
local pTeam = getPlayerTeam( thePlayer )
local fTeam = getTeamFromName( teamName )
if ( pTeam ) and ( fTeam ) then
if ( pTeam == fTeam ) then
return true
end
end
end
function targetingActivated ( target )
local wep=getPedWeapon(getLocalPlayer())
if wep==32 then
if isPlayerInTeam( getLocalPlayer(), "SAPD" ) then
if getPedControlState ( getLocalPlayer(), "aim_weapon" ) then
if isPedDucked ( getLocalPlayer() ) then
sx, sy, sz = getElementVelocity ( getLoca...
Witam, mam kod na TAXI lecz przerobi?em go. Gdy wchodz? do taxi nie pokazuje mi napisu ?e zosta?em tax?wkarzem. dam kod:
[lua]
local allow_vehs={
[420]=true,
}
function wchodzi( plr, seat, jacked )
if seat == 0 then
if not isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(plr)), aclGetGroup ( "TSA" ) ) and getElementData ( source, "pojazd:TAXI" ) then
cancelEvent()
outputChatBox ( "Nie jestes zatrudniony w Frakcji Transport of San Andreas!", plr )
end
end
end
addEventHandler ( "onVehicleStartEnter", root, wchodzi )
Witam mam tutaj kod na maxymaln? ilo?? graczy w dru?ynie "Ballas" lecz nie wiem co jest ?le
function LogujBallas (hitElement, dimension)
if countPlayersInTeam (Ballas) < 10 then
setPlayerTeam (hitElement, Ballas )
outputChatBox('Dolaczyles do druzyny Ballas.', hitElement, 184, 3, 255 )
else
outputChatBox('W tej chwili nie ma wolnych miejsc w tej druzynie !', hitElement, 184, 3, 255 )
end
end
function MarkerHit10 (hitPlayer, matchingDimension)
local playera = hitPlayer
if getElementType( playera ) == "player" then
if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( playera ) ), aclGetGroup( 'TAXI' ) ) then
moveObject ( bra10, 2500, -1781.5999755859,969.5,31.89999961853)
outputChatBox("Witaj Taks?karzu, trwa otwieranie Bramy Wjazdowej.", playera,0,255,0,true)
end
end
end
function MarkerLeave10 (thePlayer)
moveObject ( bra10, 2500, -1781.5999755859, 969.5, 26.139999389648 )
end
addEventHandler("onClientMarkerHit", loop, function(el,md)
if not md or el~=localPlayer then return end
guiSetVisible( GUIEditor.window[1], true)
showCursor(true,false)
end)
local function win()
guiSetVisible(GUIEditor.window[1], false)
showCursor(false)
end
addEventHandler("onClientMarkerLeave", loop, function(el,md)
if el~=localPlayer then return end
win()
end)
addEventHandler("onClientGUIClick", GUIEditor.button[2], function(plr)
local mandaty = getPlayerWantedLevel(plr)
local mandat = mandaty * 700
if mandaty == 0 then
outputChatBox("* Nie posia...
Witam. Ucz? si? .lua i mam problem ze skryptem pracy poniewa? nie wy??cza mi si? animacja.
Fragment kodu:
addEventHandler("onClientMarkerHit", dojsciem, function(el, md)
if not md or getElementType(el) ~= "player" then return end if el ~= localPlayer then return end
Witam, ostatnio kolega da? mi gamemode'a Gold Serwera i m?wi?, by tam zmieni? w definicjach na w?asne informacje.
Zmieni?em, skomplikowa?em i chc? wgra? na servhost.pl no niby pisze, ?e pomy?lnie dodano GM ale gdy zmieniam na niego i wchodz? na serwer to nie mam ?adnej cmd. S? tam tylko napisy na czacie ze starego gm.
Oto gm: http://sendfile.pl/pokaz/444788---IyS0.html
Stawiam piwo.
Cze?? mam skrypt wybiera?ki skin?w i team?w ale on nie dzia?a co tu jest nie tak prosz? o pomoc
C-side:
[lua]GUI = stworz GUI
btn_grove_s = stworz button
btn_ballas = stworz button
guiSetVisible(GUI, false)
function showGui()
guiSetVisible(GUI, true)
showCursor(true)
end
addEvent("showGUI", true)
addEventHandler("showGUI", resourceRoot, showGui)
function hideGUI()
guiSetVisible(GUI, false)
showCursor(false)
end
addEvent("hideGUI", true)
addEventHandler("hideGUI", resourceRoot, hideGUI)
addEventHandler("onClientGUIClick", root, function(btn)
if btn == "left" then
if source == btn_grove_s then
triggerServerEvent("groveS", localPlayer)
elseif source == btn_ballas then
triggerServerEvent("ballas", localPlayer)
end
end
return true
end)[/lua]
S-side:
[lua]addEventHandler("onPlayerJoin", getRootElement(), function()
outputChatBox("Wybierz kim chcesz zostac", source)
triggerClientEvent(source, "showGUI", source)
end)
function wyb()
spawnPlayer(source, 2528.3483886719, -1667.2764892578, 15.168592453003)
setElementModel(source, 105, 106, 107) -- grove
givePlayerWeapon(source, 28, 600)
end
addEvent("groveS", true)
addEventHandler("groveS", resourceRoot, wyb)
function wyb2()
spawnPlayer(source, 1902.2567138672, ...
function uf(el)
if el == localPlayer then
executeCommandHandler ( "connect mtasa://188.165.18.19:22120", el ) outputChatBox("Przenios?e? si? na serwer UF #1 ") end
end
addCommandHandler ("uf", uf)
function uf2(el)
if el == localPlayer then
executeCommandHandler ( "connect mtasa://188.68.249.130:20328", el ) outputChatBox("Przenios?e? si? na serwer UF #2 ") end
end
addCommandHandler ("uf2", uf2)
Nie dzia?a chodzi mi o to ?e jak wpiszemy komende to przechodzisz na 2serwer. Pomo?e kto?? W debugu nic nie ma
Siemanko chcia?em sobie przerobi? ten skrypt ( http://community.multithe...etails&id=11699 ) ale co? nie dzia?a . Odpala mi si? okno normalnie tylko ?e gdy klikam rejestruj w konsoli mam WARING. Waring: logowanieserver.lua:26: Access denied @ 'addAccount'
Cze??! Robi? system pojazd?w i nie tworzy mi w og?le pojazdu.
Komenda do tworzenia pojazdu:
[lua]addCommandHandler("veh", function(plr, com, model, owner, temp, rejka, r, g, b)
if model then
local x,y,z = getElementPosition(plr)
local rx, ry, rz = getElementRotation(plr)
if owner then else
local owner = "Publiczny"
end
if tonumber(type(temp)) ~= nil and tonumber(temp) > 0 then
local temp = true
else
local temp = false
end
if rejka then else
local rejka = nil
end
if r then else
local r = nil
end
if y then else
local y = nil
end
if z then else
local z = nil
end
local veh = stworzPojazd(model, x, y, z, rx, ry, rz, owner, temp, rejka, r, g, b)
setElementPosition(plr, x+2, y+2, z)
warpPedIntoVehicle(plr, veh)
if getElementData(veh, "uid") then
outputChatBox("* Utworzono "..getVehicleName(veh).." o UID: "..tostring(getElementData(veh, "uid"))..".", plr)
else
outputChatBox("* Utworzono "..getVehicleName(veh)..".", plr)
end
else
outputChatBox("/"..com.." [Nazwa lub ID] ([W?a?ciciel] [Tymczasowy 0-1] [Rejestracja] [R] [G] [B]", plr)
end
end)[/lua]
A tutaj sama funkcja tworz?ca:
[lua]function stworzPojazd(model, x, y, z, rx, ry, rz, owner, temp, rejka, r, g, b)
if model and owner and temp and rejka and r and g and b then
if (tonumber(type(...
Po pobraniu paczki kt?r? tak bardzo poleca? mi u?ytkownik wcze?niejszego posta, pobra?em j?. Okaza?a si? ca?kiem spoko. Ale jest jeden b??d... Nie da si? stawia? namiot?w.. Wiecie czym to jest spowodowane?
Witam. Chcia?em doda? handling do radiowoz?w przez skrypt, lecz ca?y czas nie dzia?a. Nie wiem gdzie jest b??d, wed?ug wiki jest wszystko ok, a jednak nie dzia?a.
Prosi?bym o szybk? pomoc.
Cze??, mam uno problemo. Mianowicie bawi? si? sobie z MySQL, zrobi?em system logowania z bazy danych forum, mianowicie z hase?, kt?re podajemy podczas rejestracji, ale to oddzielnie. Po naci?ni?ciu zaloguj wci?? mam dwa przyciski od wybiera?ki oraz przycisk spawn, chocia? no na ludzki rozum nie powinno go by?. Oto kodzik:
Witam.
Zacz??em si? ostatnio interesowa? budow? serwera RolePlay po d?ugim szukaniu znalaz?em gamemoda z waszego forum: http://gtao.pl/%3Cfont-co...cja-vt89449.htm i po wgraniu tego na server VPS (System Debian7) na czystego sampa i odpaleniu serwera mam problem bo w "Mode" pisze mi "Unknown". Kiedy wchodz? w ten czas gdzie nie wykrywa gamemoda wszystkie skrypty dzia?aj? lecz sam gamemod nie.
Prosi?bym o pomoc bo dopiero co zacz??em tworzy? serwer i pr?buje pisa? do niego skrypty. Z g?ry dzi?kuje za pomoc.
function los(thePlayer, cmd)
local skin = math.random(1, #bronie)
takePlayerMoney(thePlayer, 5)
if skin == 1 then
givePlayerMoney(thePlayer, 1)
outputChatBox("Wylosowa?e? skin: "..bronie[skin].." o warto?ci: 1 USD")
if skin == 2 then
givePlayerMoney(thePlayer, 1)
outputChatBox("Wylosowa?e? skin: "..bronie[skin].." o warto?ci: 1 USD")
if skin == 3 then
givePlayerMoney(thePlayer, 1)
outputChatBox("Wylosowa?e? skin: "..bronie[skin].." o warto?ci: 1 USD")
if skin == 4 then
givePlayerMoney(thePlayer, 2)
outputChatBox("Wylosowa?e? skin: "..bronie[skin].." o warto?ci: 2 USD")
if skin == 5 then
givePlayerMoney(thePlayer, 2)
outputChatBox("Wylosowa?e? skin: ".....
Witam,mam do was pytanie dlaczego po wpisaniu /bramagoh wyskakuje komunikat "Nie nale?ysz do gangu Gang Of Hooligans"
GD_GANG = "Gang Of Hooligans" GD_BRAMA = false --------------------BRAMA---------------------------- brama = createObject(980,320.39999389648,-1189,78.099998474121,0,0,40) addCommandHandler("bramagoh", function (p, c)
if getElementData(p, "gang") ~= GD_GANG then
outputChatBox("Nie nale?ysz do Gangu "..GD_GANG.." ", p)
return false
end if GD_BRAMA == true then
GD_BRAMA = false
moveObject ( brama,1000,320.39999389648,-1189,78.099998474121) outputChatBox("Brama wjazdu zamkni?ta !", p)
else GD_BRAMA = true
moveObject ( brama,1000,308.29998779297,-1197.5,78.099998474121) -- kordy bramy (szybkosc otwierania w ms,x,y,z) , tutaj podajemy kordy bramy otwartej
outputChatBox("Brama wjazdu otwarta !", p) -- tekst po wpisaniu komendy
end
end)
Gdy wpisuje komende na otwarcie /bramagoh i ju? mam na localu zrobiony team Gang Of Hooligans,i gdy wpisa?em wyskakuje "Nie nale?ysz do gangu Gang Of Hooligans" dlaczego? prosz? o poprawienie tego kodu
Witam, postanowi?em zrobi? skrypt na mo?liow?? tepania si? Administracji do spawn?w tj, LS, SF. Powiedzcie mi gdzie zrobi?em b??d(bo na pewno zrobi?em ), inforumuj?,?e skrypt mo?e by? napisany troch? niekonwecjonalnie. To co mi wyskoczy?o po debugu Loading script failed komenda/komenda.lua:7:')' expected near 'accountName'.
addCommandHandler("spawnls", function() local x = x
local y = y
local z = z
spawnPlayer()
if isObjectInAclGroup ("Admin." accountName, aclGetGroup ( "Admin )) then
if not isObjectInAclGroup ((player))then
outputChatBox("Nie masz uprawnie? do tej komendy")
end)
addCommandHandler("spawnsf",function()
local x = x
local y = y
local z = z
spawnPlayer()
isObjectInAclGroup ("user." accountName, aclGetGroup ( "Admin )) then if not isObjectInAclGroup (("Admin))then
outputChatBox("Nie masz uprawnie? do tej komendy")
end)
addEventHandler("onPlayerLogin",root,player)
function stopVehicleDamage (fire,theplayer)
setVehicleDamage(veh, true)
end
)
cancelEvent(source,"damage",false)
cancelEvent(source,"fire",false)
end
addEventHandler("onResourceStart",VehicleDamage, cancelEvent)
Zrobi?em kawa? solidnej roboty kt?r? chcia?bym przetestowa?. Testuj?, po uruchomieniu gry wyskakuje b??d:
Gta: SAMP: Windows- Application Error
The instcruction at 0x04bc64f0 referenced memory at 0x00000022. The memory couldn't be read.
Click on OK to terminate the program.
Tak?e mam owy skrypcik na admin chat, kt?ry wygl?da nast?puj?co:
function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " )
if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do
if ( isPlayerOnGroup ( player ) ) then
outputChatBox ( "#0000FFM> ".. getPlayerName ( thePlayer ) ..":".. message, player, 0, 0, 255, true ) end
end
end
end
addCommandHandler ( "m", adminchat )
function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Moderator" } ) do
if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then
inGroup = true break end
end
return inGroup
end
Ten kod jest na ACL, a pr?bowa?em go przerobi? na moj? getelementdat?, kt?ra wygl?da tak:
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) then
Ale co? mi nie wysz?o, ka?dy m?g? u?ywa? czatu itd. Wi?c pom?g?by mi kto? przerobi? ACL na getelementdat?, tak? jaka jest tu? Za pomoc piwo.
Witam, mam problem z tym, ?e gdy kto? chcia?by otworzy? jaki? samoch?d to poprostu zmienia nick na nick w?a?ciciela. Chcia?bym ukr?ci? te procedery i poprostu nada? prawa do operowania samochodem osobie kt?ra jest zalogowana na konto w?a?ciciela auta.
[code]
function enterVehicle ( source, seat, jacked )
local playercar = getPedOccupiedVehicle ( source )
if(seat == 0) then
if (getElementData ( playercar, "owner" )) then
if(getElementData ( playercar, "owner" ) ~= "Nobody" ) then
if(getElementData ( playercar, "owner" ) == getPlayerName ( source )) then
outputChatBox ("To twoj pojazd!",source, 255,255,127 )
else
outputChatBox ("Ten pojazd jest wlasnoscia: "..getElementData ( playercar, "owner" ).."",source, 255,255,127 )
end
else
local price = getElementData ( playercar, "price" )
triggerClientEvent ( source, "showBuyCar", source, price)
toggleAllControls ( source, false, true, false )
return true
end
end
end
end