ChrisT Posted July 18, 2019 Share Posted July 18, 2019 Sziasztok van egy scriptem ami a ban-t mutatja hogy ha beírom /ban [Játékos nevét] Akkor örökje bannolja [ban]:Játékos név Ki lett bannolva Admin által [ban] indok: Nem ölöd meg az admin-t!! nos azt szeretném hogy ha beírom hogy /ban Chris 4(idő) Indok így kellene mutatnia [ban]:Játékos Ki lett bannolva Admin által (x órára) [ban]:Indok: Nem ölöd meg az admint és úgy kellene lennie hogy ha 1-et írok akkor 1 óra ha 2,3,4,5,6,7,8,9 akkor annyi óra amennyit beírok. ne mp. vagy perc hanem óra pl 2589 akkor 2589 órára :: ja és ha az írom hogy 0 akkor óra helyett azt írja hogy (Véglegesen) [NEM SAN,EXTERNAL,FREEDOM SZERVERRE KELL, A SAJÁT SCRIPTES SZERORA AMI MÉG NEM INDULT EL!!] Quote function banPlayerCommand ( theClient, commandName, bannedName, ... ) if hasObjectPermissionTo ( theClient, "function.kickPlayer" ) then if not ... then return outputChatBox ("#7cc576[Használat]:#ffffff /ban [Név] [óra] [indok]", theClient, 255, 255, 255, true ) end local reason = table.concat({...}," ") local bannerName = getPlayerName(theClient):gsub("#%x%x%x%x%x%x","") local bannedPlayer = getPlayerFromName(bannedName) if not isElement(bannedPlayer) then outputChatBox ("#7cc576Sikertelen ban mivel hibás játékos nevet adtál meg, vagy a játékos lecsatlakozott!", theClient, 255, 255, 255, true ) end outputChatBox("#d75959[Ban]:#7cc576"..getPlayerName(bannedPlayer):gsub("#%x%x%x%x%x%x","").." #ffffffKi lett bannolva#7cc576 ".. bannerName .." által (IDE KELLENE AZ IDŐT) #32b3ef", root, 255, 0, 0, true ) outputChatBox("#d75959[Ban]:#7cc576Indok:#ffffff"..reason, root, 255, 0, 0, true ) banPlayer ( bannedPlayer, theClient, reason ) else outputChatBox ("#7cc576[Használat]:#ffffff Nem vagy Admin! ", theClient, 255, 255, 255, true ) end end addCommandHandler ( "ban", banPlayerCommand ) Link to comment
NONAME_1224 Posted July 19, 2019 Share Posted July 19, 2019 Ez legyen a kód: function banPlayerCommand ( theClient, commandName, bannedName, ora, ... ) ora = tonumber(ora)*60*60 if hasObjectPermissionTo ( theClient, "function.kickPlayer" ) then if not ... then return outputChatBox ("#7cc576[Használat]:#ffffff /ban [Név] [óra] [indok]", theClient, 255, 255, 255, true ) end local reason = table.concat({...}," ") local bannerName = getPlayerName(theClient):gsub("#%x%x%x%x%x%x","") local bannedPlayer = getPlayerFromName(bannedName) if not isElement(bannedPlayer) then outputChatBox ("#7cc576Sikertelen ban mivel hibás játékos nevet adtál meg, vagy a játékos lecsatlakozott!", theClient, 255, 255, 255, true ) end outputChatBox("#d75959[Ban]:#7cc576"..getPlayerName(bannedPlayer):gsub("#%x%x%x%x%x%x","").." #ffffffKi lett bannolva#7cc576 ".. bannerName .." által (IDE KELLENE AZ IDŐT) #32b3ef", root, 255, 0, 0, true ) outputChatBox("#d75959[Ban]:#7cc576Indok:#ffffff"..reason, root, 255, 0, 0, true ) banPlayer(bannedName, true, false, false, reason, ora) else outputChatBox ("#7cc576[Használat]:#ffffff Nem vagy Admin! ", theClient, 255, 255, 255, true ) end end addCommandHandler ( "ban", banPlayerCommand ) Ez alapján ez a parancs: /ban Chris 123 Csak mert bannolva lettél és kész! Elvileg működik, nem teszteltem. Link to comment
ChrisT Posted July 19, 2019 Author Share Posted July 19, 2019 a 2. sorba irja ki hogy (Nil Value) Link to comment
NONAME_1224 Posted July 19, 2019 Share Posted July 19, 2019 (edited) Az csak azért lehet, mert nem adtál meg időt. EDIT: A parancs ez: "/ban [Név] [Óra] [Indok] "/ban Chris 123 BannHammer!" Edited July 19, 2019 by TyFun Link to comment
ChrisT Posted July 20, 2019 Author Share Posted July 20, 2019 De akkor azt irja ki hogy Indok 123 és örökre bannol Link to comment
NONAME_1224 Posted July 23, 2019 Share Posted July 23, 2019 Igen... meg is van a probléma csak elnéztem egy argumentumot a 15. Sor legyen ez: banPlayer(bannedPlayer, true, false, false, nil, reason, ido) Ha megint nem írtam el semmit. Ha igen írj aztán megint ránézek. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now