SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Gamemode Scripts

Reply
 
Thread Tools Display Modes
Old 30/12/2012, 07:36 PM   #1
Chriham3
Big Clucker
 
Join Date: Mar 2010
Location: Norway
Posts: 97
Reputation: 9
Default Roleplay Server [ZCMD SSCANF DINI SCRATCH]

Hello! I am Chriham3.

In the last few months I have been working on this project.

31/08/2012 was the date I officially pressed new.pwn in PAWNO, and I started from there. I originally started working on this as a personal project, learning to script and more. I must say this has helped me alot. I never intended to release this, however I am now going to start on a new project (MySQL), and I will create that from scratch aswell.

This is the first time I've ever released anything. So feedback is much appreciated be it criticism or good things.

Enough of that, let's speak about the gamemode.

The gamemode is a roleplay gamemode and everything is situated in Los Santos.

Features
There's a quiz when you register. 3 wrongs = kick and you have to re-take the quiz.
You spawn at Unity Station when you register, you can select any skin when you spawn through a dialog.
We have 4 functional factions. (LSPD, LSFMD, Hitman Agency, FBI, .. Government and SA News are there initially, but I haven't taken my time to finish that.)
I have added 3 jobs. Trucker, Arms Dealer, Bodyguard.Truckers can pick up a load at Ocean Docks and they will get a random load. The higher level you are, the better and bigger loads you can get. Arms Dealer can sell the following weapons: Weapon Dealer Level 1: sdpistol(100 mats) 9mm(150 mats) shotgun(200 mats)Weapon Dealer Level 2: mp5(400 mats) bat(25 mats) rifle(1500 mats)Weapon Dealer Level 3: katana(50 mats) ak47(2000 mats) deagle(1000 mats)Weapon Dealer Level 4: spas(6000 mats) m4(3000 mats)Weapon Dealer Level 5: sniper(7000 mats) knuckles(50 mats)
A car dealership system. The commands for vehicles are: /vlist, /vspawn, /vdespawn, /park. There's currently only 2 vehicles, however you can add that easily by searching for:"// Dealership" and then you can add another vehicle by adding DSV[#] = CreateVehice(...);
You can level up by playing. You don't have to buy anything to level up or gather respect points, you level up as you gain playing hours.
Dynamic doors, you can create an interior in-game.
LSPD can jail players up to 20 minutes if they have a charge. LSPD have barricades, spikes and cones. They have lockers. You can edit price for weapons on OnDialogResponse.
If you die, you can /ems or /giveup. If you give up you will respawn at either County General or All Saints. You lose your weapons and a hospital bill on $200 if you give up. You will keep your weapons if EMS saves you. You lose health over time while downed.
Unique operator system. If you call 911, the call will be forwarded to an actual LSPD officer which will eventually call dispatch over /r(adio) or /d(eparment).
You can buy drinks inside bars, have fun and dance with animations. (/animlist)
There are several clothes stores / 24/7, however they can be added ingame if you wish to add more of them. The commands are /buy. You can buy any skin inside a clothes store, and you can buy a cellphone or spraycan inside 24/7.
There are many logs. Chat log, Radio Log, Department Log, invite logs, hack logs, ban logs, command logs, vehicle delete logs (unique ids on cars, so if an account has been breached or an user accidentaly deletes their car they can check the logs and match the unique id and refund it) and moneytracer log. If any account has been hacked there's a log where you can see what they have spent their money on.
About 40 admin commands. (/kick, /ban, /fine, /slap, /reports, /spec)
Roleplay commands such as /me and /do. Lists of commands are on /help and /ah for admins.
Anti-hack system (Anti Warp/Anti Weapon Hacks/Anti Crasher)

Here's a full effective changelog:

Code:
[31/08/2012]

Officially pressed new.pwn
Scripted register system that saves:
- Password
- Level
- Cash
- Kills
- Death
Added in cars in the game.
Added initial factions
- LSPD (1)
- FBI (2)
- LSFMD (3)
- Hitman (4)
- Government (5)
- SA News (6)
**Reached 1,000 lines.

[1/09/2012]

Added a /stats command.
Added a /help command.
Added a playing hours system, every 8 hours, you level up a level.
Added initial jobs (1: Trucker, 2: Bodyguard, 3: Weapon Dealer)
Added skill levels, capped at level 5. Every 100 skill points, you get one level.
Added trucks at trucker job.
Restricted trucks for truckers. (Certain trucks require certain levels)
Added /tazer for LSPD.
Added 5 diffrent trucking routes.
Added in the following in the save system:
- PosX
- PosY
- PosZ
- Skin
- Faction
- FacRank
- FacDiv
- Job
- TruckerSkill
- WDealerSkill
- Banned
- Unban
- IP
Added a ban system
Added a IP ban system.
Added an unban system.
When you die you will now have to accept your death or call for ems.
Fixed a bug that attempted to spawn you twice in some cases and would bug you.
**Reached 2,500 lines.

[2/09/2012]

Patched an exploit where as you could jump out of the truck and get a level 5 payment while driving a level 3 truck.
Made it so you need to have a trailer attached to your truck in order to load the truck.
Made it so the trailer respawn when delivered.
You will now only recieve a skill point if you return the truck after the delivery.
Patched an exploit that allowed you to grab a new truck to return if you lost it.
Added a checkpoint system in case someone manages to exploit a checkpoint to get a faster route.
Fixed a bug that deleted your bank account.
Fixed a bug that made you spawn at X: 0 Y: 0 Z: 0.
Fixed a bug that set your skin to 0 when you die.
**Reached 3,000 lines.

[3/09/2012]

Added job location for Weapon Dealer.
Removed custom pickups and use IsPlayerInPointOfRange function.
Added /sellgun for weapon dealers.
Added a weapon saving system.
- Weapon Dealer Level 1: sdpistol(100 mats) 9mm(150 mats) shotgun(200 mats)
- Weapon Dealer Level 2: mp5(400 mats) bat(25 mats) rifle(1500 mats)
- Weapon Dealer Level 3: katana(50 mats) ak47(2000 mats) deagle(1000 mats)
- Weapon Dealer Level 4: spas(6000 mats) m4(3000 mats)
- Weapon Dealer Level 5: sniper(7000 mats) knuckles(50 mats)
Added /getmats with 5 diffrent routes.
You recieve 200 plus a random amount from 0-100 from a material delivery.
Scripted admin chat (/a).
Updated /help.
Added a log system to log bans, chat, kicks and what not. 1 line log = Log(destination, string);
Fixed an exploit in /getmats.
Added a security check on material running to ensure players can not exploit checkpoints.
Added level 2 trucks and level 1 trucks.
Fixed a bug that allowed you to /loadtruck on foot. 
Fixed a bug that didn't give you materials when entering the checkpoint.
Added /skill.
Added a isnull check on chat commands so they don't send empty strings.
Added /revive for level 3 admins.
Added /makeadmin.
Fixed a critical dialog exploit in login screen.
Added checks if your player is logged in before SpawnPlayer can be called due to an exploit.
Added 2 repeating timers on login and register; HackCheck (interval on 3 seconds) and PlayingHours (1 second).
Added a dynamic door system based on the Horizon Roleplay one.
Fixed a messy script by adding SetPlayerWeapons instead of giving every weapon manually.
Added a anti-weapon hack system.
Updated the /tazer to work functionally with the anti-weapon hack system. 
Left out golf club and parachute from anti hack as it is a San Andreas feature.
**Reached 4000 lines.

[04/09/2012]

Added another check on weapon hacks, so if a player performs an action that gives, resets or take weapons, 
the weapon hack detection will wait 3 seconds before running another check to prevent a false ban.
Fixed a bug that rollbacks your PlayerPos on entering injured state.
Added a check on OnPlayerDisconnect so you will recover at the hospital if you quit while injured or recovering.
Added an autosave timer on playerlogin, character save every 10 minutes and when you log out/crash/timeout.

[12/9/2012]

Fixed a bug where you could taze a player that is already tazed.
Made it so you can not switch weapons while your tazer is unholstered.
Added /badge
Fixed a bug that didn't save your account properly.
Fixed a bug that didn't holster your tazer when logged out.
Fixed a bug that didn't cancel the /sellgun if the buyer or seller logs out.
Added /cuff and /uncuff.

[13/9/2012]

Fixed a bug that unfroze you if you were tazed before cuffed.
Added 0.3e cuffs on /cuff.

[15/9/2012]

Added /detain with seat id checks and cuff checks.
Added /slap
Added /drag
Made it so you stop dragging on uncuff.
You can now /cuff people that have their hands up.
Fixed a bug that didn't clear your animations after being untazed.
Added /su
/su does now save reason on playerfile.
**Reached 4500 lines.

[16/9/2012]

Added /arrest [playerid/partofname] [time (1-20 min)] [fine (0-500)] [bail (0-1000)]
Added time and bail and jail on savefile.
Made it so you will respawn in jail if you die.
Fixed a bug that didn't uncuff you.
Fixed a bug that dragged you back if you didn't release first.
Added /prison
Added /release
Added /time
Rewrote the timer system on jail.
Fixed a bug that released you from prison when you were supposed to be released even if you got released by an admin.
Finished /arrest fully.
Fixed some string issues on wanted reason.
Added OOC chat.
OOC chat is only visible for players that have enabled it via /togooc
Made it so if you are injured and move 6 units away from your death pos, you will be sent straight to hospital.
Added an anti-tp hack system with a lot of checks to prevent false-positives.
Fixed a bug if you died while recovering, it'd recover you twice.
Made /r and /d compatible with LSFMD.
Added even more checks on anti-tp hack system.
Fixed timers not functioning properly
Added /setadminname
If you log in with a non-rp name you will be given a dialog to change the name or quit.
Added /gotoid
Added /gethere
Fixed a bug that dragged players to coordinates 0, 0, 0 if the dragger left the server.
Fixed a bug that dragged players to the hospital if the player died.
Added a SkipTPCheck function.
Made it so you can not go on admin duty while injured.
Added /goto (ls/sf/lv/allsaints/trucker)
Fixed a critical command and dialog exploit that allowed you to breach into a players account.
**Reached 5000 lines.

[18/9/2012]

Added /ems
Added /acceptcall
Added /load
Added /deliver
Added 2 hospital delivery points
Added /drop [materials/weapons]
Fixed a bug where you could not enter a faction restricted car as passenger
Added /respawnvehicles
Added /div
Fixed a bug on login that released you from prison even if you were not prisoned.
Added /giverank
Added /accept, and intergrated /acceptwep into it.
Added /invite.
Added /uninvite.
Added in a second hospital, County General hospital.
**Reached 6000 lines.

[19/9/2012]

Added /lockers
 - Auto Duty
	... Badge
	... Spray Can, Nitestick, Shotgun, MP5, Desert Eagle
	... 100 Health & 100 Armor
 - Equipment
	... Spray Can, Nitestick, Shotgun, MP5, Desert Eagle, Spas-12 ($700), Sniper ($800), Health, Armor
 - Uniforms
	... Cadet Skin
	... Officer Skin
	... Corporal Skin
	... Corporal Skin 2
	... Corporal Skin 3
	... Sergeant Skin
	... Lieuteant Skin
	... Chief Skin
 - Self Select Skin
	... Dialog

Added CJ running style
Added /newb (/n, /newbie)
Added /tognewb
Added 2 helper stats; Helper and Super Helper.
Added a 30 second timer between each /newb, however admins and helpers are excluded.
Added even more checks on teleport hacking. Should be VERY accurate now. Timers are on 3 seconds, at 2 seconds (2000ms) it will check if the player has teleported,
then confirm if it was a legit telport or not. If the system think it's not a legit one, it will wait one second (1000ms) then check again to confirm.
Added /sendtols
Added lockers of FBI.
After long testing and debugging the anti-teleport system, you will now be banned automatically after 3 confirmed teleport hacks.
**Reached 7000 lines

[21/09/2012]

Added /spec
Added /mole
Added a change name ability to FBI.
Fixed a bug that reset your password if you changed your name.
Added /worldevent and /endworldevent
Added a quiz on register.

[23/09/2012]

Added barricades. /deploycade, /deploycade2, /destroycades, destroycade
Added spike strips. /deployspike, /destroyspike, /destroyspikes
Added cones. /deploycone, /destroycone, /destroycones
Added interpolating cameras on register and login.
Added interpolating cameras on quiz.
Added real time in-game time. (EU GMT +1)

[24/09/2012]

Increased the radius in /destroycade, /destroycone and /destroyspike.

[3/10/2012]

Fixed various typos.
Fixed a lot of indentations, made the script cleaner.
Fixed a bug that crashed the server if ban.cfg was not found.
Added /buy for clothes stores.
Added /givemoney for A4.
Added /fine for A3.
Added 24/7 stores.
Added cellphones.
Added /call
Added /p.
Added functionall calling chat.
Added /h.
Added checks to make sure noone get number 555, 911 or 0.
Fixed a bug that sent the dialog to change skin to the wrong id when you /uninvite someone.
Fixed a checkpoint bug with LSFMD.
Added a 911 operator system, if someone calls 911, they have to accept a call and it will set them over to a 911
operator.

[4/10/2012]

Added /nrn
Fixed a bug with /jail that didn't set the time correctly.
Made it so you cant release players that are not in prison.
Made it so you can not ban, prison, jail, tp or kick a higher level administrator.
Added anti-server crasher with crypted text spam.
Anti fake-kill hacks.
Added helper chat /c.
Added automatic prison if you log while cuffed.

[5/10/2012]

Added a base vehicle ownership system.
Fixed a bug that allowed you to taze someone driving or in the passenger seat.
Added /givegun.
Made it so you can not taze injured players.
Fixed a bug that said your truck was damaged even if it wasn't loaded due to 0 == 0 match.
Made it so you can now buy up to 5 vehicles.
Added /park.
Fixed a bug on vehiclespawn that set unowned vehicles to owner = 0;
Added anti-warp systems that warn the admins if a player is warping. (very accurate)
Made it so warped vehicles respawn.
**Reached 8500 lines

[7/10/2012]

Added /vspawn.
Added /vdespawn
Added /vtrack
Added /vlist
Fixed a bug that didn't set the vehicle rotation correctly.
Added /vdelete
Added vehicle plates.
Added /checkip
Added /nmute
Added /newb timer for non-helpers and non-admins.
Added spraycan to 24/7s.
Added color saving.

[21/11/2012]

Added events
Added /seteventpos, /editevent, /startevent, /announceevent, /lockevent and /beginevent

	eStarted,
	eLocked,
	eAnnounced,
	eBegun,
	Float:eHealth,
	Float:eArmor,
	eSkin,
	Float:eX,
	Float:eY,
	Float:eZ,
	eVW,
	eINT,
	eGun1,
	eGun2,
	eGun3,
Fixed a bug with /div that displayed the wrong divison name.
Added division names on /d.

[16/12/2012]

Added /contract, /contracts, /givemehit, /accept hit, and hit is completed if contracted is killed. 
Added /hstats, added successfull and failed hits.

[21/12/2012]

Added /buydrink.
0 = Beer ($2) 1 = Wine ($5) 2 = Cocktail ($4) 3 = Piņacolada ($4) 4 = Mojito ($4) 5 = Cider ($3) 6 = Sprunk ($1)

[27/12/2012]
Converted many global variables to PVarInts
Deleted the whole vehicle ownership, rescripting.
Added /vspawn for the new vehicle system.
Made the vehicle buy system compatible with the new system.
Added /vlist for the new vehicle system.
Added /vdespawn for the new vehicle system.
Fixed a bug with parking a vehicle.
Remade color saving to be compatible with the new system.

[30/12/2012]
Added /quitevent
Fixed a bug when a player killed the hitman, the player didnt get the money.
Added bodyguard job (job 3) with the following command: /sellvest -> /accept vest.

[TODO]
Changelog v2 - starting from 30.12.2012
Code:
Added /makeleader
Added /gmx
Fixed a small bug with the cellphone system when you are not on a call.

--

Fixed a 3D text that was ontop of a 24/7 3D text.
Added /findboatmatrun (just for the sake of being able to find the /getmats for boats)
There might be a little messy codes some places in the script, and I apologize for that. I never intended to release this at first and I tried various methods to script.

Screenshots:
(I didn't put them in [img] tags because they are quite big)
http://i.imgur.com/OfCoL.jpg
http://i.imgur.com/mjDdj.jpg
http://i.imgur.com/xCVKx.jpg
http://i.imgur.com/j19Fa.jpg
http://i.imgur.com/lApBp.jpg
http://i.imgur.com/OhS57.jpg
http://i.imgur.com/Hi0Kp.jpg
http://i.imgur.com/wKG5i.jpg
http://i.imgur.com/Ty4xT.jpg
http://i.imgur.com/LtCIC.jpg

PASTEBIN:
http://pastebin.com/gXwEQsK1
FULL PACK:
<removed>

Note, to make yourself admin, log out from the server and go into your scriptfiles, users -> your username.ini, and edit admin = 6. To make another player an admin use /makeadmin.

Thank you. Please leave comments / suggestions / bugs below!
__________________
http://lawlessrp.com/

Last edited by Y_Less; 20/07/2013 at 01:43 PM.
Chriham3 is offline   Reply With Quote
Old 30/12/2012, 07:45 PM   #2
ajam123
Huge Clucker
 
Join Date: May 2012
Location: United Kingdom
Posts: 366
Reputation: -12
Default Re: Roleplay Server [Scratch + Factions + more]

You make it or release from Here?
__________________
Skype: Damian Daci
ajam123 is offline   Reply With Quote
Old 30/12/2012, 07:50 PM   #3
GhostDeath
Big Clucker
 
GhostDeath's Avatar
 
Join Date: Dec 2012
Location: Right behind you , turn slowly
Posts: 75
Reputation: -7
Default Re: Roleplay Server [Scratch + Factions + more]

Very nice
GhostDeath is offline   Reply With Quote
Old 30/12/2012, 07:53 PM   #4
Chriham3
Big Clucker
 
Join Date: Mar 2010
Location: Norway
Posts: 97
Reputation: 9
Default Re: Roleplay Server [Scratch + Factions + more]

Quote:
Originally Posted by ajam123 View Post
You make it or release from Here?
I made this from scratch, I have not taken any code from that gamemode, no.
It's a very diffrent piece of coding aswell.
__________________
http://lawlessrp.com/

Last edited by Chriham3; 29/03/2013 at 07:58 PM.
Chriham3 is offline   Reply With Quote
Old 30/12/2012, 08:09 PM   #5
bathushan
Huge Clucker
 
Join Date: May 2012
Location: Germany
Posts: 299
Reputation: -22
Default Re: Roleplay Server [Scratch + Factions + more]

Sounds Good, I'll test it if i have time
BTW: KEEP IT UP:
__________________

You want a Mapper? PM me with your Server ip!
bathushan is offline   Reply With Quote
Old 30/12/2012, 08:21 PM   #6
Criswell
Big Clucker
 
Criswell's Avatar
 
Join Date: Dec 2012
Location: Norway
Posts: 55
Reputation: 9
Default Re: Roleplay Server [Scratch + Factions + more]

Awesome, will test it now.
__________________

Convertible Role Play coming soon, follow us on ******** by clicking here.
Criswell is offline   Reply With Quote
Old 30/12/2012, 08:22 PM   #7
Lambordi
Little Clucker
 
Join Date: Dec 2012
Posts: 31
Reputation: 0
Default Re: Roleplay Server [Scratch + Factions + more]

I can't make myself admin through RCON?
Lambordi is offline   Reply With Quote
Old 30/12/2012, 08:23 PM   #8
Chriham3
Big Clucker
 
Join Date: Mar 2010
Location: Norway
Posts: 97
Reputation: 9
Default Re: Roleplay Server [Scratch + Factions + more]

Quote:
Originally Posted by Lambordi View Post
I can't make myself admin through RCON?
Nah. To make yourself admin go into the userfile and edit the admin line to 6. (Note can not be logged in while doing this)
__________________
http://lawlessrp.com/

Last edited by Chriham3; 29/03/2013 at 07:58 PM.
Chriham3 is offline   Reply With Quote
Old 30/12/2012, 08:26 PM   #9
Criswell
Big Clucker
 
Criswell's Avatar
 
Join Date: Dec 2012
Location: Norway
Posts: 55
Reputation: 9
Default Re: Roleplay Server [Scratch + Factions + more]

The gamemode is great, but there isn't any license system?
__________________

Convertible Role Play coming soon, follow us on ******** by clicking here.
Criswell is offline   Reply With Quote
Old 30/12/2012, 08:27 PM   #10
Simmons
Little Clucker
 
Join Date: Mar 2011
Posts: 22
Reputation: 1
Default Re: Roleplay Server [Scratch + Factions + more]

Awsome, going to test it now.
Simmons is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:29 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.