Mirage Source
http://web.miragesource.net/forums/

Warn Player
http://web.miragesource.net/forums/viewtopic.php?f=183&t=4440
Page 1 of 49

Author:  skillzalot [ Wed Sep 24, 2008 2:11 am ]
Post subject:  Warn Player

Ok this is my first tutorial. This works with the newest version of ms4 so ya. C&P 1 out of 5 to add. This is an edit of NEans Jail command

Client Side

Find
Code:
CGetClasses = 1


Under Add
Code:
CWarnPlayer


Find
Code:
' // Mapper Admin Commands //


Above Add
Code:
' Warn player
                Case "/warn"
                    If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then
                        If UBound(Command) >= 1 Then
                            SendData CWarnPlayer & SEP_CHAR & Command(1) & END_CHAR
                        End If
                    End If


Thats all for client

Server side

Find
Code:
CGetClasses = 1


Under Add
Code:
CWarnPlayer


Under
Code:
' ::::::::::::::::::::::
' :: Quit game packet ::
' ::::::::::::::::::::::
Sub HandleQuit(ByVal Index As Long)
    Call CloseSocket(Index)
End Sub


Add
Code:
            ' ::::::::::::::::::::::::
            ' :: Warn Player Packet ::
            ' ::::::::::::::::::::::::
Sub HandleWarnPlayer(ByVal Index As Long, ByRef Parse() As String)
Dim n As Long

            ' Prevent hacking...
            If GetPlayerAccess(Index) < ADMIN_CREATOR Then
                Call HackingAttempt(Index, "Admin Cloning")
            Exit Sub
        End If

    n = FindPlayer(Parse(1))

        If n <> Index Then
        If n > 0 Then
        'Sends messages out
            Call PlayerMsg(n, "You have been Warned by an admin.", BrightRed)
            Call GlobalMsg(GetPlayerName(n) & " has been Warned by an admin.", BrightRed)
        Else
            Call PlayerMsg(Index, "Player is not online.", White)
        End If
        Else
            Call PlayerMsg(Index, "You cannot Warn yourself!", White)
        End If

    End Sub


For admin panel button make a label called btnwarn in it add
Code:
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
            Call SendData(CWarnPlayer & SEP_CHAR & txtPlayerAdmin.Text & END_CHAR)
        End If


There you go all done. This warns the player that he is breaking a rule and to stop doing whatever he is doing. Enjoy. Post all comments and criticism here

Author:  Nean [ Wed Sep 24, 2008 3:44 am ]
Post subject:  Re: Warn Player

It's good, but basic. What would be a nice addition, is to make a .ini file or something, that checks to see if hte player has been warned before. If so then it carries, a certain action. Then on the third strike, they get a ban. Nevertheless, a good first tut.

Author:  Egon [ Wed Sep 24, 2008 3:53 am ]
Post subject:  Re: Warn Player

I'd just add a warning stat to the player.ini and have it check that. Every time you warn them it would increase by one and once it reaches three you'd get kicked or banned.

Author:  Rian [ Wed Sep 24, 2008 4:14 am ]
Post subject:  Re: Warn Player

You could also use DFAs System Time tut and do things like reducing the players warning level by 1 like every week or 3 days or something.

I've been doing much thinking regarding bans, ban times, and warnings and stuff lately.

Author:  Nean [ Wed Sep 24, 2008 7:53 pm ]
Post subject:  Re: Warn Player

Egon wrote:
I'd just add a warning stat to the player.ini and have it check that. Every time you warn them it would increase by one and once it reaches three you'd get kicked or banned.


What functions would you use? Getvar and putvar?

Author:  Mattyw [ Wed Sep 24, 2008 8:12 pm ]
Post subject:  Re: Warn Player

Don't forget ability to give a reason for Warning. =-p

Author:  Egon [ Fri Sep 26, 2008 3:11 am ]
Post subject:  Re: Warn Player

Well first you'd have to use GetVar to make sure they aren't going to match or pass the number for kicking or banning or whatever.. Then PutVar to set the value. It's not all that hard.

Author:  wanai [ Wed Dec 01, 2021 7:58 am ]
Post subject:  Re: Warn Player

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Wed Dec 29, 2021 12:48 pm ]
Post subject:  Re: Warn Player

Econ

Author:  wanai [ Wed Dec 29, 2021 12:49 pm ]
Post subject:  Re: Warn Player

57.1

Author:  wanai [ Wed Dec 29, 2021 12:50 pm ]
Post subject:  Re: Warn Player

Bett

Author:  wanai [ Wed Dec 29, 2021 12:51 pm ]
Post subject:  Re: Warn Player

Bett

Author:  wanai [ Wed Dec 29, 2021 12:52 pm ]
Post subject:  Re: Warn Player

Sick

Author:  wanai [ Wed Dec 29, 2021 12:53 pm ]
Post subject:  Re: Warn Player

Forb

Author:  wanai [ Wed Dec 29, 2021 12:55 pm ]
Post subject:  Re: Warn Player

Intr

Author:  wanai [ Wed Dec 29, 2021 12:56 pm ]
Post subject:  Re: Warn Player

Emma

Author:  wanai [ Wed Dec 29, 2021 12:57 pm ]
Post subject:  Re: Warn Player

Homo

Author:  wanai [ Wed Dec 29, 2021 12:58 pm ]
Post subject:  Re: Warn Player

Wern

Author:  wanai [ Wed Dec 29, 2021 12:59 pm ]
Post subject:  Re: Warn Player

Wind

Author:  wanai [ Wed Dec 29, 2021 1:00 pm ]
Post subject:  Re: Warn Player

Prim

Author:  wanai [ Wed Dec 29, 2021 1:01 pm ]
Post subject:  Re: Warn Player

Extr

Author:  wanai [ Wed Dec 29, 2021 1:02 pm ]
Post subject:  Re: Warn Player

Exce

Author:  wanai [ Wed Dec 29, 2021 1:03 pm ]
Post subject:  Re: Warn Player

Gard

Author:  wanai [ Wed Dec 29, 2021 1:05 pm ]
Post subject:  Re: Warn Player

Anto

Author:  wanai [ Wed Dec 29, 2021 1:06 pm ]
Post subject:  Re: Warn Player

Brit

Page 1 of 49 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/