-
Posts
73 -
Joined
-
Last visited
Everything posted by aski
-
Dobrze już mam dziękuję zrobiłem od podstaw jak uda mi się stworzyć doby gamemod to go wydam
-
so that the output from the server all signed up and after re-logging function unless wczytało setAccountData getAccountData
-
are you able to perform the function of the output from the server was saved plis function GivePassport ( player, commandName, nick ) local targetPlayer = getPlayerFromName ( tostring ( nick )) local team = getTeamFromName ( "Urzad" ) if getPlayerTeam( player) == team then if targetPlayer == false then outputChatBox ( "Gracz nie jest podłączony do serwera" , player) return end setElementData (targetPlayer, "prawo" , true ) outputChatBox ( "Gracz .. nick .. otrzymał prawo jazdy" , player ) else outputChatBox ( "Nie jestes pracownikiem urzedu!" , player ) end end function CheckPassport ( player, commandName, nick ) local targetPlayer = getPlayerFromName ( tostring ( nick )) local team = getTeamFromName ( "Urzad" ) if getPlayerTeam( player) == team then if targetPlayer == false then outputChatBox ( "Gracz nie jest podłączony do serwera" , player) return end if getElementData ( targetPlayer, "prawo" ) then outputChatBox ( "Gracz posiada prawo jazdy" , player) else outputChatBox ( "Gracz nie posiada prawa jazdy" , player ) end else outputChatBox ( "Nie jestes pracownikiem urzedu!" , player ) end end addCommandHandler ( "zobaczprawko CheckPassport) sorry my bad english
-
but I need to would write after leaving the server and the entry time time to grow and after entering the server is not counted from the beginning. Sorry for my poor English
-
if somebody is able to combine the functions: exports.scoreboard:addScoreboardColumn('Online Time') local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "Online Time", tostring( hour )..':'..tostring( min )..':'..tostring( sec ) ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'Online Time' ) setAccountData ( playeraccount, "Online Time", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "Online Time" ) if ( time ) then setElementData ( source, "Online Time", time ) else setElementData ( source, "Online Time",0 ) setAccountData ( playeraccount, "Online Time",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin ) of which: setAccountData getAccountData and explain? please
-
jak zrobić aby logować sie do teamu wchodząc w pickup ale trzeb było by być w ACL
-
a jak jest local sekundy = 5 --co ile sekund to nie powinno być: local sekundy = 5000
-
dziękuję to jest plik .lua? function moneyToDriver(thePlayer) local model = getElementModel(thePlayer) local vehicle = getVehicleOccupants(thePlayer) if model == 438 or 420 and vehicle >1 then local timer = setTimer(givePlayerMoney,5000,0,thePlayer,5) local timer2 = setTimer(takePlayerMoney,5000,0,vehicle,5) end end function insertTaxdi( thePlayer, seat, jacked) local model = getElementModel(thePlayer) local vehicle = getVehicleOccupants(thePlayer) if model == 438 or 420 and seat == 0 and jacked or not jacked then killTimer(timer) killTimer(timer2) elseif model == 438 or 420 and seat >1 then killTimer(timer) killTimer(timer2) end end addEventHandler ( "onVehicleExit", getRootElement(), insertTaxdi)
-
whether it is a file. lua? and thank you for your help.
-
l can not do something like that if someone gets into a vehicle Taxi, Cabbie, the driver gives the example $ 5 every 5 seconds, and the customer takes $ 5 every 5 seconds when two clients it takes all and gives the driver for two people, when the driver goes no action alone is not happening. How do such a thing to begin if someone can help me? Please how do I do this taxi system sorry for my bad english
-
nie potrafie wykonać takiego czegoś że jak ktoś wsiada do pojazdu Taxi, Cabbie, to kierowcy daje np 5 dolarów co 5 sekund a klientowi zabiera 5 $ co 5 sekund, gdy jest dwóch klientów to zabiera wszystkim a daje kierowcy za dwie osoby, Gdy kierowca jedzie sam żadna akcja się nie dzieje. Jak takie coś wykonać od czego zacząć czy to mi pomoże?: przykładowy skrypt pracy prostytutki, da się coś z tym zrobić? Server: function hookersightscheck (source) local element = getPlayerTarget ( source ) if (element) then if ( getElementType ( element ) == "player" ) then if (getElementData ( source , "horny" ) ~= "hellno") and (getElementData ( element , "currentstatus" ) ~= "gettingblown") then if ( isPlayerDucked ( source ) ) then local currentgun = getPlayerWeapon ( source ) if ( currentgun == 0 ) and ( isPlayerInVehicle( element ) == false ) then local kskin = getPlayerSkin ( source ) if kskin == 10 or kskin == 214 or kskin == 190 then local hooker = source local john = element local cx, cy, cz = getElementPosition ( source ) local px, py, pz = getElementPosition ( element ) if ( getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) < 3 ) then playSoundFrontEnd ( hooker, 40 ) triggerClientEvent ( john, "hooker_showblowjobMessage", getRootElement(), hooker) setElementData ( john, "currentstatus", "gettingblown", false ) setElementData ( hooker, "currentstatus", "blowingaplayer", false ) end end end end end end end end function askOnEnter ( theVehicle, seat, jacked ) if (getVehicleType(theVehicle) == "Automobile") or (getVehicleType(theVehicle) == "Helicopter") or (getVehicleType(theVehicle) == "Monster Truck") then local kskin = getPlayerSkin ( source ) if kskin == 10 or kskin == 214 then if seat == 1 then local john = getVehicleOccupant ( theVehicle, 0 ) if isElement(john) then local hooker = source playSoundFrontEnd ( hooker, 40 ) triggerClientEvent ( john, "hooker_showblowjobMessage", getRootElement(), hooker) setElementData ( john, "currentstatus", "gettingblown", false ) setElementData ( hooker, "currentstatus", "blowingaplayer", false ) end elseif seat == 3 then local john = getVehicleOccupant ( theVehicle, 2 ) if isElement(john) then local hooker = source playSoundFrontEnd ( hooker, 40 ) triggerClientEvent ( john, "hooker_showblowjobMessage", getRootElement(), hooker) setElementData ( john, "currentstatus", "gettingblown", false ) setElementData ( hooker, "currentstatus", "blowingaplayer", false ) end end end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), askOnEnter ) function hookerspawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) local kskin = theSkin if kskin == 85 or kskin == 87 or kskin == 90 or kskin == 152 or kskin == 169 or kskin == 178 or kskin == 238 or kskin == 244 or kskin == 256 or kskin == 257 or kskin == 264 or kskin == 68 then addEventHandler( "onPlayerWasted", source, hookerdied ) bindKey ( source, "aim_weapon", "down", hookersightscheck ) end end addEventHandler ( "onPlayerSpawn", getRootElement(), hookerspawn ) function hookerdied () unbindKey ( source, "aim_weapon", "down", hookersightscheck ) end --THIS IS AFTER A PLAYER AGREES addEvent ("hooker_suckingstarted", true ) function gettoit(hooker, john) if isPlayerInVehicle(hooker) == false then setElementData ( john, "legalstatus", "illegal" ) setElementData ( hooker, "legalstatus", "illegal" ) local cx, cy, cz = getElementPosition ( john ) setPedAnimation ( hooker, "BLOWJOBZ", "BJ_Couch_Loop_W", -1, true, false, false) local takeanother = setTimer ( slurp, 3000, 1, hooker, john ) else setElementData ( john, "legalstatus", "illegal" ) setElementData ( hooker, "legalstatus", "illegal" ) setPedAnimation ( hooker, "BLOWJOBZ", "BJ_Car_Start_W", -1, false, false, true) setTimer ( setPedAnimation, 2000, 1, hooker, "BLOWJOBZ", "BJ_Car_Loop_W", -1, true, false, false) local takeanother = setTimer ( carslurp, 3000, 1, hooker, john ) end end addEventHandler ( "hooker_suckingstarted", getRootElement(), gettoit ) --THIS IS WHEN THE PLAYER SAYS NO addEvent ("hooker_suckingdenied", true ) function hookrejection(hooker, john) setElementData ( john, "horny", "hellno", false ) setElementData ( john, "currentstatus", nil, false ) setElementData ( hooker, "currentstatus", nil, false ) local resetanswer = setTimer ( reconsider, 30000, 1, john ) end addEventHandler ( "hooker_suckingdenied", getRootElement(), hookrejection ) function reconsider(john) setElementData ( john, "horny", nill, false ) end function slurp(hooker, john) local cx, cy, cz = getElementPosition ( john ) local px, py, pz = getElementPosition ( hooker ) local johnmoney = getPlayerMoney(john) local currentgun = getPlayerWeapon ( hooker ) if ( currentgun == 0 ) then if ( getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) < 3 ) and ( johnmoney > 4 ) then takeanother = setTimer ( slurp, 3000, 1, hooker, john ) playSoundFrontEnd ( hooker, 10 ) playSoundFrontEnd ( john, 10 ) takePlayerMoney ( john, 5 ) givePlayerMoney ( hooker, 5 ) local tx,ty,tz = getElementPosition( john ) local px,py,pz = getElementPosition( hooker ) local angle = ( 360 - math.deg ( math.atan2 ( ( tx - px ), ( ty - py ) ) ) ) % 360 setPedRotation( hooker, angle ) local johnhealth = getElementHealth ( john ) if johnhealth < 98 then setElementHealth ( john, johnhealth+3 ) end else setElementData ( john, "currentstatus", nil, false ) setElementData ( hooker, "currentstatus", nil, false ) setElementData ( john, "legalstatus", "legal" ) setElementData ( hooker, "legalstatus", "legal" ) setPedAnimation ( hooker ) end else setElementData ( john, "currentstatus", nil, false ) setElementData ( hooker, "currentstatus", nil, false ) setElementData ( john, "legalstatus", "legal" ) setElementData ( hooker, "legalstatus", "legal" ) setPedAnimation ( hooker ) end end function carslurp(hooker, john) local johnmoney = getPlayerMoney(john) local currentgun = getPlayerWeapon ( hooker ) if (isPlayerInVehicle(hooker) == true) and (isPedDoingGangDriveby (hooker) == false) then if (isPlayerInVehicle(john) == true) and ( johnmoney > 4 ) and (isPedDoingGangDriveby (john) == false) then takeanother = setTimer ( carslurp, 3000, 1, hooker, john ) playSoundFrontEnd ( hooker, 10 ) playSoundFrontEnd ( john, 10 ) takePlayerMoney ( john, 5 ) givePlayerMoney ( hooker, 5 ) local johnhealth = getElementHealth ( john ) if johnhealth < 98 then setElementHealth ( john, johnhealth+3 ) end else setElementData ( john, "currentstatus", nil, false ) setElementData ( hooker, "currentstatus", nil, false ) setElementData ( john, "legalstatus", "legal" ) setElementData ( hooker, "legalstatus", "legal" ) setPedAnimation ( hooker, "BLOWJOBZ", "BJ_Car_Stop_W", -1, false, false, true) end else setElementData ( john, "currentstatus", nil, false ) setElementData ( hooker, "currentstatus", nil, false ) setElementData ( john, "legalstatus", "legal" ) setElementData ( hooker, "legalstatus", "legal" ) end end Client: function showblowjobMessage(hooker) myhooker = hooker showCursor ( true ) local x, y = guiGetScreenSize() if not blowjobBox then blowjobBox = guiCreateWindow( x*.5-150, y*.5-65, 300, 120, "PRACA PROSTYTUTKI", false ) guiWindowSetSizable( blowjobBox, false ) blowjobMessage = guiCreateLabel( 100, 40, 180, 60, "", false, blowjobBox ) blowjobOk = guiCreateButton( 90, 90, 70, 20, "TAK!", false, blowjobBox ) blowjobNo = guiCreateButton( 170, 90, 70, 20, "NIE!", false, blowjobBox ) addEventHandler( "onClientGUIClick", blowjobNo, nothanks ) addEventHandler( "onClientGUIClick", blowjobOk, startsucking ) else guiSetPosition( blowjobBox, x*.5-150, y*.5-65, false ) guiSetVisible( blowjobBox, true ) end guiSetText( blowjobMessage, "HEJ SŁODZIAKU ZABAWIMY SIE?" ) guiBringToFront( blowjobBox ) end addEvent( "hooker_showblowjobMessage", true ) addEventHandler( "hooker_showblowjobMessage", getLocalPlayer(), showblowjobMessage ) function nothanks() john = getLocalPlayer() guiSetVisible( blowjobBox, false ) showCursor ( false ) triggerServerEvent ( "hooker_suckingdenied", getLocalPlayer(), myhooker, john ) end function startsucking() john = getLocalPlayer() triggerServerEvent ( "hooker_suckingstarted", getLocalPlayer(), myhooker, john ) showCursor ( false ) guiSetVisible( blowjobBox, false ) end
-
1.Mam skrypt wszytko działa daje prawo jazdy jako urzędnik lecz po wyjściu i wejściu na server prawa jazdy nie mam co zrobić aby prawo jazdy się zapisywało: function GivePassport( player, commandName, nick ) local targetPlayer = getPlayerFromName(tostring(nick)) local team = getTeamFromName("Urzad") if getPlayerTeam(player) == team then if targetPlayer == false then outputChatBox("Gracz nie jest podłączony do serwera", player) return end setElementData(targetPlayer, "prawo", true) outputChatBox("Gracz .. nick .. otrzymał prawo jazdy", player) else outputChatBox("Nie jestes pracownikiem urzedu!", player) end end function CheckPassport( player, commandName, nick ) local targetPlayer = getPlayerFromName(tostring(nick)) local team = getTeamFromName("Urzad") if getPlayerTeam(player) == team then if targetPlayer == false then outputChatBox("Gracz nie jest podłączony do serwera", player) return end if getElementData(targetPlayer, "prawo") then outputChatBox("Gracz posiada prawo jazdy", player) else outputChatBox("Gracz nie posiada prawa jazdy", player) end else outputChatBox("Nie jestes pracownikiem urzedu!", player) end end addCommandHandler("zobaczprawko CheckPassport) ____________________________________________________________________________________________ 2. mam komende Fix i chce aby była zrobiona pod acl jak połączyć tą funkcje z tą: function oprava (player, command) local auto = getPedOccupiedVehicle(player) fixVehicle(auto) local prachy = getPlayerMoney(player) if prachy > 0 then takePlayerMoney(player, 0) outputChatBox("Pojazd został naprawiony." .. getPlayerMoney(player), player, 0, 255, 0) end end addCommandHandler("fix", oprava) z tym: local playerName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Mechanik" ) ) then
-
Raczej nie doczekasz się tego BP stał by się jak by to powiedzieć RPG by Marmat czy jakoś tak, ale nie mi to oceniać
-
Zapraszam wszystkich Na server Super Play Pl, server działa od niedawna. Jesteśmy na serv Project a to oznacza brak Lagowania, posiadamy Zgraną Ekipe Administracji Oto kilka próbek: http://superplay.phorum.pl/viewtopic.php?f=32&t=60 http://superplay.phorum.pl/viewtopic.php?f=32&t=154 ZAPRASZA CAŁA ADMINISTRACJA: ASKI SAMMY INCA DANTE *STRIK3R* KILLER 178.19.105.100:22116 178.19.105.100:22116 178.19.105.100:22116 178.19.105.100:22116 178.19.105.100:22116 178.19.105.100:22116 178.19.105.100:22116
-
Jak wykonać range VIP z kodu
aski replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
jeszcze mam to: Widget płatności ServerProject.pl ale to tylko link HTML i BBCODE(na forum) -
Mam takie coś czy da sie z tego zrobić panel VIP na server? wyglądało to by że wpisuje się na servie /vip i można wysłać sms w zależności od dni np 8 dni 2,46 i dodaje do Acl na okres 8 dni oraz zasila mi wirtualny portfel na serverproject.pl czyt. Zasilenie hostingu (opłata hosta) : $apikey = 'Tutaj jest Klucz'; $sms_amount = 1; $sms_code = 'fsytsz12'; $contents = file_get_contents("https://admin.serverproject.pl/api/smsapi.php?key=$apikey&amount=$sms_amount&code=$sms_code"); if ($contents) { $contents = json_decode($contents); if ($contents->error) { echo 'Błąd: '.$contents->error; } else { if ($contents->status == 'ok') { echo 'Kod poprawny. Portfel właściciela został doładowany kwotą '.$contents->amount.' PLN.'; } else { echo 'Nieznany błąd'; } } } else { echo "Błąd połączenia z API."; } jak to działa, i jak to zlepić mam ten kod z mojego Hostingu, polecono mi do utworzenia VIP ale nie rozumiem
-
ale jak chce sam taki napisać to jak sie tego naumieć skoro nie można zrozumieć?
-
Od dłuższego czasu się zastanawiam jak to jest pisane oraz jak to czytać, czy to jakieś zabezpieczenie? Jak to napisać? zabezpieczyć i odbezpieczyć? LuaQ t @ E€ \ € € €€ Ŕ Ŕ Ŕ€ G€ @ Ŕ Ŕ€ G@ € $ Ŕ A@ ‚ € @€€ A@ …Ŕ ĹŔ @ $@ @ A€ ‚ € @€€ A€ …Ŕ Ĺ@ @ AŔ ‚ € @€€ AŔ …Ŕ ä€ @ $Ŕ $ @ A@ ‚ € @€€ A@ …Ŕ Ĺ@ @ $@ € A€ ‚ € @€€ A€ …Ŕ Ĺ€ @ $€ Ŕ AŔ ‚ € @€€ AŔ …Ŕ ĹŔ @ @ E€ … ÁŔ \€€ äŔ @ Ŕ A@ @ € AŔ …€ Ĺ Á ś€€Á UŔ€ @ Á@ B€ @ Ŕ A @ € % rRoot getResourceRootElement getThisResource lp getLocalPlayer x y guiGetScreenSize sw sh drawed Draw addEvent DrawDx addEventHandler root drawed2 Draw2 DrawDx2 Sound requestTop returnTop showLevelWindow hideLevelWindow
-
rozbrojenie wszystkich graczy w obrębie 300 metrów
aski replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
dziekuje wszystkim za pomoc, bardzo mi to forum pomaga oraz jest przyjazne. Bardzo wiele sie nauczylem dzieki wam i zapewne wiele naucze. to tyle Pozdrawiam wszystkich użytkownioków oraz administracje. -
rozbrojenie wszystkich graczy w obrębie 300 metrów
aski replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
w przypadku uzdrowienia i amor: giveHealth ( v, 100 ) czy setHealth ( v, 100 ) giveArmor ( v, 100 ) czy setArmor ( v, 100 ) -
rozbrojenie wszystkich graczy w obrębie 300 metrów
aski replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
w tes sposób>? addCommandHandler("bro", function(plr,cmd,odleglosc) -- if not isRCON(plr) then return end odleglosc=tonumber(odleglosc) if (not odleglosc or odleglosc<1 or odleglosc>10000) then outputChatBox("Uzyj: /bro <1-10000> - rozdanie broni gracza o podanym zasiegu", plr) return end local x,y,z=getElementPosition(plr) local col=createColSphere(x,y,z,odleglosc) local el=getElementsWithinColShape(col,"player") if (#el<=1) then outputChatBox("Nie ma nikogo w poblizu",plr) return end for k,v in ipairs(el) do outputChatBox(getPlayerName(plr) .. " rozdal/a bron ", v) giveWeapon ( source, 31, 200 )(v) end destroyElement(col) end,false,false) -
rozbrojenie wszystkich graczy w obrębie 300 metrów
aski replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
a gdybym chcial teraz kazdemu graczowi dac np. bron, zycie lub armor to od czego zalezy? bedzie mialo zwiazek z giveweapon, setheal, setarmor? -
Błąd z systemem PM/PW na ID
aski replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
Nie chodzi mi o gamemode bo to wiem chodzi o ten wycinek -
Błąd z systemem PM/PW na ID
aski replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
Czy związek ma to z bazą danych mysql ? -
system pm nie działa z [url=https://github.com/lpiob/MTA-XyzzyRP/bl]https://github.com/lpiob/MTA-XyzzyRP/bl[/url] ... ore/pm.lua Jak to włącze to wyskakuje mi linijka Najpierw wejdz do gry a kiedy usune ze kodu tą linijkne to nie wysyła wiadomości pm.