[GameMode] [R38 MySQL] Fort Carson - Base, start your own gamemode!
#1

Author: Jack Leslie
Plugins: mysql sscanf streamer Whirlpool
Includes: a_samp, a_mysql, sscanf, streamer, foreach, a_zones, y_commands
Lines when originally released: 1,003
Lines now: 1,681

Fort Carson Roleplay - Base Script
Do not use this if you do not know how to use mysql, I will not explain it.
You can read this tutorial: https://sampforum.blast.hk/showthread.php?tid=129183


This is a personal project I started to teach my self MySQL, as this was the first time I have ever used it. I've done enough here for someone to use a base and continue it into their own gamemode. Note though, I will not explain how to use MySQL. If you would like the table structure, grab it from pastebin here.

Features:
Basic registration and login, passwords are encrypted with Whirlpool.
Basic roleplay commands including /me, /my, /do and /whisper.
Security Key for Administrators on login (no command in game for 'make admin', do that via a sql query)
Basic death system - when you die you get sent to the medical center for 30 seconds. there is a textdraw that counts down the time. the time also saves when you log off so you will log back in and still be in hospital.
I also added a speedhack warning that sends a warning to admins if a player is traveling at a high speed.
Location textdraw under minimap
Helper and Ask system
Report system

Player commands:
/my
/do
/me
/whisper
/ooc
/myquestion
/report
/ooc
/ask
/answer (helpers only)
/hc (helpers only)

Helper and ask system:
Non-helpers can do /ask [question], and it will send the question to online Helpers, who can then /answer [player] and it will send the answer to the player. A player can only ask 1 question at a time and can check their question via /myquestion. Admins and Helpers can not ask a question. This is similar to the "newbie" chat on most common servers.

To make someone a helper, you need to either be a level 2 helper, or level 3 admin. Once a level 3+ admin makes someone a level 2 helper, a level 2 helper can make someone a level 1 helper, or level 0 (fired) helper. A level 2 helper can not demote another level 2 helper. A level 2 helper can also not make someone a level 2 helper.

Report system:
When players report, it sends the report to online Admins, for Admins to respond to the report, press TAB to open the online player list, click on the players name and it will display report information. An admin can then decide to respond or simply delete the report. A player will be notified when the Admin opens the report, replies or closes the report.

Administrator commands:
A - level 1
Kick - level 1
Ban - level 2
Unban - level 2
Hospitaleject - level 2
Warn - level 3
Spawnvehicle - level 3
Destroyvehicle - level 3

Administrator control:
Level 2+ admins can click on a player in the online list and it will open a dialog with controls such as set virtual world, and set interior for that player.

Warning system:
Level 3 admins can /warn a player for a reason, when a player reaches their 3rd warning they will get an automatic ban. If an admin tries to warn another admin that is a higher admin then it will send an admin warning.

From here you should be able to develop it into whatever you want. I hope you enjoy. Please remember to keep copyright, and add to my reputation if you intend to use.

I've attached a couple of images for a preview.
If you find faults in the MySQL syntax, coding or structure; feel free to let me know so I can improve my knowledge.

Plugins: http://www.solidfiles.com/d/fa04517cdc/plugins.rar
Gamemode: http://www.solidfiles.com/d/3185176646/fortcarson.rar - 04/07/2014

FAQ:
How do I make my self admin?

Run this query in the `fortcarson` table:
Code:
UPDATE `fortcarson` SET AdminLevel='6', AdminKey='key' WHERE Fullname='username'
Replace key with numerals, and username with your characters name without underscores.

I get errors, why?
Update all your includes and make sure you are using R38 Mysql.
Reply
#2

Awesome Work
+Rep
Reply
#3

Good job mate. I bet a lot of new people will use it. +1 rep!
Reply
#4

Cool sauce (:
Reply
#5

Nice gamemode +rep
Reply
#6

Thanks for the positive response guys.
Reply
#7

Good job Jack. It's very nice as your first try.
Reply
#8

Sorry but does your gamemode come with the sql file?
Edit Sorry found it
Reply
#9

Quote:
Originally Posted by [L]azy[H]aze
View Post
Sorry but does your gamemode come with the sql file?
Edit Sorry found it
http://pastebin.com/bkpkUgE2
Reply
#10

Why does literally everyone have cheats installed? Fucking hell.
Reply
#11

I like it.People will easily do more additions in enum.Good work,I guess.
Reply
#12

Sorry would you be able to give me the whole server pack without exe tho as when i try to start it mysql wont load but any other gamemode it will
Reply
#13

Quote:
Originally Posted by Vince
Посмотреть сообщение
Why does literally everyone have cheats installed? Fucking hell.
To quickly teleport to places to save positions, such as spawns, vehicles, etc.
Reply
#14

Cheats detected , Nice work by the way
Reply
#15

Update:

As I was testing new Administrator features I noticed the players virtual world and interior weren't set when they logged on, as a result a player always spawned in vw 0 and interior 0. That has been fixed. I have always added administrator vehicles, /spawnvehicle and /destroyvehicle.

The administrator features I added was when a level 2+ administrator clicks on a players name on the default sa-mp online players list, a dialog pops up with Set Virtual World and Set Interior. I found this would be easier for Administrators instead of having a lot of commands.

Hope you enjoy this little update, it will probably be the last public update.

Also, I forgot to add, to make your self Admin, run this SQL query when you register an account:
Код:
UPDATE `fortcarson` SET AdminLevel='6', AdminKey='1234' WHERE Fullname='username'
Reply
#16

Thanks for this mate. One of clean and awesome base script to start off.
Reply
#17

Cool but there is to much admin levels :/
Reply
#18

Quote:
Originally Posted by Vince
Посмотреть сообщение
Why does literally everyone have cheats installed? Fucking hell.
Because being an administrator in a RolePlay server(like me, I am coming from NGG with the admin name of McTavish) is sometimes rather hard when you have to airbreak to teleport vehicles out etc.. that's why some if not most people have hacks installed.(Of course we also have the trolls who like to disrupt servers, but that's another story)

OT: Very nice GameMode. Keep up the good work!
Reply
#19

Quote:
Originally Posted by Development
Посмотреть сообщение
Because being an administrator in a RolePlay server(like me, I am coming from NGG with the admin name of McTavish) is sometimes rather hard when you have to airbreak to teleport vehicles out etc.. that's why some if not most people have hacks installed.(Of course we also have the trolls who like to disrupt servers, but that's another story)

OT: Very nice GameMode. Keep up the good work!
I don't see how an admin needs to airbreak to teleport a vehicle out -.- /getcar for example.

Anyways nice gamemode, I'm doing this myself now.
Reply
#20

Good, very good +rep
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)