Mirage Source

Free ORPG making software.
It is currently Thu May 02, 2024 6:43 pm

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1173 posts ]  Go to page 1, 2, 3, 4, 5 ... 47  Next
Author Message
 Post subject: Warn Player
PostPosted: Wed Sep 24, 2008 2:11 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
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


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Sep 24, 2008 3:44 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
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.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Sep 24, 2008 3:53 am 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 09, 2007 3:16 am
Posts: 276
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.

_________________
Image
Island of Lost Souls wrote:
Dr. Moreau: Mr. Parker, do you know what it means to feel like God?


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Sep 24, 2008 4:14 am 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
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.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Sep 24, 2008 7:53 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
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?

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Sep 24, 2008 8:12 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Don't forget ability to give a reason for Warning. =-p


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Fri Sep 26, 2008 3:11 am 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 09, 2007 3:16 am
Posts: 276
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.

_________________
Image
Island of Lost Souls wrote:
Dr. Moreau: Mr. Parker, do you know what it means to feel like God?


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 01, 2021 7:58 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:48 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Econ


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:49 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
57.1


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:50 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Bett


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:51 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Bett


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:52 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Sick


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:53 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Forb


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:55 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Intr


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:56 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Emma


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:57 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Homo


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:58 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Wern


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 12:59 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Wind


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 1:00 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Prim


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 1:01 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Extr


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 1:02 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Exce


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 1:03 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Gard


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 1:05 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Anto


Top
 Profile  
 
 Post subject: Re: Warn Player
PostPosted: Wed Dec 29, 2021 1:06 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Brit


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1173 posts ]  Go to page 1, 2, 3, 4, 5 ... 47  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group