Szerző Téma: infobox meghívása  (Megtekintve 3136 alkalommal)

Nem elérhető Daevod

  • 109
    • Profil megtekintése
infobox meghívása
« Dátum: 2015. Március 20. - 18:59:29 »
0 Show voters
Sziasztok! Egy olyan kérdésem lenne , hogy mi az a script , vagy mi az a script sor amit be kell írni másik scriptbe , pl /adminduty , és akkor leugorjon az infobox?. Válaszokat előre is köszönöm! CSAK A MEGHÍVÁSA KELL , NEM AZ INFOBOX! :)

Nem elérhető Tarack

  • 177
    • Profil megtekintése
infobox meghívása
« Válasz #1 Dátum: 2015. Március 20. - 19:11:53 »
0 Show voters
Meghívás
Kliens oldalon:
 

exports.resource neve:showBox (\"info,warning,error (ezek lehetnek)\",\"szöveg,amit akarsz\")

 
Szerver oldalon:
 

exports.resource neve:showBox (source,\"info,warning,error(ezek lehetnek)\",\"szöveg,amit akarsz\")

Nem elérhető Royalf

  • 222
    • Profil megtekintése
infobox meghívása
« Válasz #2 Dátum: 2015. Március 21. - 14:19:47 »
0 Show voters

--Adminduty (szerver oldal, mindenki látja)
local adminneve = getPlayerName(thePlayer)
exports.notifications:showBox(\"info\", adminneve .. \" adminszolgálatba lépett.\")
--Valami error (szerver oldal, csak az adott ember látja)
exports.notifications:showBox(source, \"error\", \"Nincs elég benzin a kocsiban\")
--Valami info (kliens oldal)
exports.notifications:showBox(\"info\", \"Sikeresen felvetted a földről\")

 
Remélem érthetően írtam le (Ugye alap, letölthető notifications script -re írtam a példákat)

Download:
https://community.multitheftauto.com/index.php?p=resources&s=details&id=5812
« Utoljára szerkesztve: 2015. Március 21. - 14:24:56 írta Royalf »

Nem elérhető Daevod

  • 109
    • Profil megtekintése
infobox meghívása
« Válasz #3 Dátum: 2015. Március 21. - 21:03:38 »
0 Show voters
És az adminos részt az admin systembe kell írni vagy hova? :) Válaszodat köszönöm!

Nem elérhető Royalf

  • 222
    • Profil megtekintése
infobox meghívása
« Válasz #4 Dátum: 2015. Március 21. - 21:28:40 »
0 Show voters
Mivel gondolom Valhalla/ZeroMTA modról van szó itt az adminduty teljes kódja ezzel kiegészítve (admin-system > player > s_player_commands.lua)
 
function adminDuty(thePlayer, commandName)
if exports.global:isPlayerAdmin(thePlayer) then
local adminduty = getElementData(thePlayer, \"adminduty\")
local username = getPlayerName(thePlayer)
local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
local playerName = getPlayerName(thePlayer)
local pmid = getElementData(thePlayer, \"playerid\")
if (adminduty==0) then --Adminduty belépés
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 1) --Ez teszi be admindutyba
                        exports.notifications:showBox(root, \"info\",username .. \" adminszolgálatba lépett.\") --Ez itt a felugró ablak (bejelentkezett)
elseif (adminduty==1) then --Adminduty kilépés
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 0) --Ez szedi ki adminduty -ból
                        exports.notifications:showBox(root, \"info\", username .. \" kilépett az adminszolgálatból.\") --Ez itt a felugró ablak (kijelentkezett)
end
mysql:query_free(\"UPDATE accounts SET adminduty=\" .. mysql:escape_string(getElementData(thePlayer, \"adminduty\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(thePlayer, \"gameaccountid\")) )
exports.global:updateNametagColor(thePlayer)
end
end
addCommandHandler(\"adminduty\", adminDuty, false, false)
addCommandHandler(\"aduty\", adminDuty, false, false)
addCommandHandler(\"admind\", adminDuty, false, false)
« Utoljára szerkesztve: 2015. Március 21. - 21:55:23 írta Royalf »

Nem elérhető Daevod

  • 109
    • Profil megtekintése
infobox meghívása
« Válasz #5 Dátum: 2015. Március 21. - 21:49:38 »
0 Show voters
Így meg nem lehet szolgálatba lépni.

Nem elérhető Royalf

  • 222
    • Profil megtekintése
infobox meghívása
« Válasz #6 Dátum: 2015. Március 21. - 21:56:17 »
0 Show voters
Elírtam a kódot bocsi. Elvileg most jó. Fáradt vagyok kicsit bocsi :D

Nem elérhető Daevod

  • 109
    • Profil megtekintése
infobox meghívása
« Válasz #7 Dátum: 2015. Március 21. - 22:00:24 »
0 Show voters
Semmi gond , de most se lehet szoliba lépni. :)

Nem elérhető Royalf

  • 222
    • Profil megtekintése
infobox meghívása
« Válasz #8 Dátum: 2015. Március 21. - 22:02:22 »
0 Show voters
Hibaüzenetet tudsz adni?

Nem elérhető Daevod

  • 109
    • Profil megtekintése
infobox meghívása
« Válasz #9 Dátum: 2015. Március 21. - 22:03:49 »
0 Show voters
Persze. Csak a debugscript 3 nem működik , tehát az írja hogy nincs ilyen parancs. Azon kívűl hol találom meg ? És akkor küldöm. :)

Nem elérhető Royalf

  • 222
    • Profil megtekintése
infobox meghívása
« Válasz #10 Dátum: 2015. Március 21. - 22:04:51 »
0 Show voters
Hát esetleg az a console ablak amiről legelőször is csatoltál képet.

Nem elérhető Daevod

  • 109
    • Profil megtekintése
infobox meghívása
« Válasz #11 Dátum: 2015. Március 21. - 22:06:27 »
0 Show voters
Képet nem csatoltam , vagy bocs ha értetlenkedek , csak már nekem is este van egy kicsit , meg már összezavarodok itt. :)

Nem elérhető Royalf

  • 222
    • Profil megtekintése
infobox meghívása
« Válasz #12 Dátum: 2015. Március 21. - 22:08:37 »
0 Show voters
Egy console ablakot fényképezz le vagy valamit amiben látszik mi a hiba

infobox meghívása
« Válasz #13 Dátum: 2015. Március 21. - 22:09:54 »
0 Show voters
Próbáld meg ezzel nekem is ez van bent az admin-systmbe
 
function adminDuty(thePlayer, commandName)
if exports.global:isPlayerAdmin(thePlayer) then
local adminduty = getElementData(thePlayer, \"adminduty\")
local username = getPlayerName(thePlayer)
local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
local playerName = getPlayerName(thePlayer)
local pmid = getElementData(thePlayer, \"playerid\")
if (adminduty==0) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 1)
   -- outputChatBox(\"Admin szolgálatba léptél.\", thePlayer, 0, 255, 0)
   exports.global:sendMessageToAdmins(\"AdmDuty: \" .. username .. \" szolgálatba lépett.\")
   outputChatBox(playerName .. \" adminszolgálatba lépett! /pm \"..pmid..\" parancsal írsz neki!\", getRootElement(), 0, 255, 0,true)
   exports.infobox:showBox(root, \'info\', \"\".. playerName .. \" kilépett adminszolgálatból! Bármi gond van írj neki /reportban.\");
elseif (adminduty==1) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 0)
   outputChatBox(\"Kiléptél az Admin szolgálatból.\", thePlayer, 255, 0, 0)
   --exports.global:sendMessageToAdmins(\"AdmDuty: \" .. username .. \" kilépett a szolgálatból.\")
   outputChatBox(playerName .. \" kilépett az adminszolgálatból!\", getRootElement(), 255, 0, 0,true)
   exports.infobox:showBox(root, \'info\', \"\".. playerName .. \" adminszolgálatba lépett! /pm \".. pmid ..\" parancsal írhatsz neki.\");
end
mysql:query_free(\"UPDATE accounts SET adminduty=\" .. mysql:escape_string(getElementData(thePlayer, \"adminduty\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(thePlayer, \"gameaccountid\")) )
exports.global:updateNametagColor(thePlayer)
end
end
addCommandHandler(\"adminduty\", adminDuty, false, false)

Nem elérhető Royalf

  • 222
    • Profil megtekintése
infobox meghívása
« Válasz #14 Dátum: 2015. Március 21. - 22:11:29 »
0 Show voters
Azt nem értem, hogy nem működhet. Teljesen alapot másoltam be, csupán felesleges kiírások eltávolítva, infobox hozzáada.
« Utoljára szerkesztve: 2015. Március 21. - 22:15:44 írta Royalf »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal