Telefonról írtam meg, lehet van benne hiba. Valamint aki ért hozzá, annak is mondanám, hogy nem vagyok túl jó ebben, ezért a sértő kritikát mellőzzétek, köszönöm!
Itt egy példa rá, hogyan kell megcsinálni. Csak az egyik felét csináltam meg, mivel telóról írok.
Másik fele csak annyi, hogyha az admindutyja 1, akkor 0 lesz.
function aduty(playerSource, cmd)
if getElementData(playerSource, \"adminlevel\") >= 1 then
if getElementData(playerSource, \"adminduty\") == 0 then
setElementData(playerSource, \"adminduty\", 1)
outputChatBox(\" Adminszolgálatba léptél!\", playerSource, 0,0,0,true)
exports.infobox:ShowBox(\"info\", getPlayerName(playerSource).. \" adminszolgálatba lépett! Ha üzenni akarsz neki: /pm \" ..getPlayerName(playerSource)\")
end
end
end
addEventHandler(\"aduty\", aduty)
addCommandHandler(\"aduty\", function(player, cmd)
if not exports[\'global\']:isPlayerAdmin(player) then return end
if getElementData(player, \"adminduty\") == 0 then
exports[\'notifications\']:showBox(root, \"info\", getPlayerName(player)..\" adminszolgálatba lépett\")
setElementData(player, \"adminduty\", 1)
else
exports[\'notifications\']:showBox(root, \"info\", getPlayerName(player)..\" kilépett az adminszolgálatból\")
setElementData(player, \"adminduty\", 0)
end
end)
Telefonról írtam meg, lehet van benne hiba. Valamint aki ért hozzá, annak is mondanám, hogy nem vagyok túl jó ebben, ezért a sértő kritikát mellőzzétek, köszönöm!
Itt egy példa rá, hogyan kell megcsinálni. Csak az egyik felét csináltam meg, mivel telóról írok.
Másik fele csak annyi, hogyha az admindutyja 1, akkor 0 lesz.
function aduty(playerSource, cmd)
if getElementData(playerSource, \"adminlevel\") >= 1 then
if getElementData(playerSource, \"adminduty\") == 0 then
setElementData(playerSource, \"adminduty\", 1)
outputChatBox(\" Adminszolgálatba léptél!\", playerSource, 0,0,0,true)
exports.infobox:ShowBox(\"info\", getPlayerName(playerSource).. \" adminszolgálatba lépett! Ha üzenni akarsz neki: /pm \" ..getPlayerName(playerSource)\")
end
end
end
addEventHandler(\"aduty\", aduty)
látszik, hogy nem te írtad :)
ha az infoboxból akarna exportálni, akkor nem lenne jó a script, mivel notofocations forrásból kellene az export, ráadásul nekem kicsit ctrl c ctrl v nek tűnik, de szerintem nem csak nekem, copyman :D