SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 17/05/2017, 10:54 AM   #1
RxErT
Huge Clucker
 
Join Date: May 2016
Location: SA:MP Lemon
Posts: 249
Reputation: 12
Thumbs up DeathMatch Event [Friendly, Funny, Controllable]

Death Match Event System


Introduction
Hello there, so i'm releasing today my first new system, it's a DM Event, i recommend you to use it in your server!
it's great for Roleplay,Freeroam,TDM,CnR, And whatever because it has a very nice content as i am enjoying scripting it and playing it haha

Features
  • This DM Event is much Controllable because it has a gold command and it's /fire, so an admin could kick players from the Event if they abused or if they was using hack or whatever.
  • Random Event Spawns.
  • Event Timer to start.
  • A Little DM Map.
  • Added /dmcmds to see DM Events available commands.
  • FOR MORE READ UPDATES PARAGRAPH.

Updates
  • Optimized some little messy codes, and the language.
  • Combined /startdm with /dmevent, because it was facing a little annoying problem, so now when you start a DM event by typing /dmevent, you will have to type it again to CLOSE the DM event and START it. (Just once).
  • Added /updates commands, so you'll not lose any news feed.
  • Added a `Text` for the reason of the firing, so you are now be able to kick/fire a cheater from the DM event with a reason.
  • Added a Message to a player when he join/leave the DM event, so players will be notified when someone joins the DM Event.
  • Added /leavedm command, so if player got bored waiting the event to start he can simply type /leavedm and leave.
  • Added a new variable new EventStarted[MAX_PLAYERS]; to facilitate the work .

How to Install it
Just download the .pwn file below in the Downloads Category and Copy all the content or download it, then paste the codes which it's in it into Pawno.exe and compile it then use the .amx copy to Load the filterscript.
and then go to your server.cfg and then open it and go the filterscripts line and write behind it Event the close the server.cfg and save allthings and start your server and enjoy playing the event system!

Pictures
Outdated:
http://imgur.com/2Pm33GS
http://imgur.com/0XLLGgQ
http://imgur.com/54tX7b3
http://imgur.com/bLSbvQ1 (ain't updating it... sorry)

Requirements
You'll need to run the script correctly these .inc files:

zcmd.inc - http://forum.sa-mp.com/showthread.php?t=91354
sscanf2.inc - http://forum.sa-mp.com/showthread.php?t=602923
foreach.inc - http://forum.sa-mp.com/showthread.php?t=570868

Downloads
| Pastebin | [Version 1.0]
| Pastebin | [Version 1.1]
| Pastebin | [Version 1.2 + Recommended]
| GitHub | [Version 1.2 + Recommended + plugins and includes]

Suggestions are welcome!
If you find anything strange, let me know then, by a PM or discord (in my Signature)!
Thanks for reading my thread

Last edited by RxErT; 04/03/2018 at 01:42 PM. Reason: New version 1.2
RxErT is offline   Reply With Quote
Old 17/05/2017, 11:06 AM   #2
Infinity
High-roller
 
Infinity's Avatar
 
Join Date: Jul 2009
Posts: 1,229
Reputation: 975
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

Could you please fix the indentation?
__________________

I apologize for the stupidity of my fellow members

Quote:
Originally Posted by !damo!spiderman View Post
Stand for something that's going to help the world rather than fill it with more hate. Give someone a hug, tell someone you care... Do something, do anything but do it with love not hate.
Infinity is offline   Reply With Quote
Old 17/05/2017, 11:08 AM   #3
RxErT
Huge Clucker
 
Join Date: May 2016
Location: SA:MP Lemon
Posts: 249
Reputation: 12
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

Quote:
Originally Posted by Infinity View Post
Could you please fix the indentation?
Hello Infinity, i can't see any poor indentation can you mark them if you could please
RxErT is offline   Reply With Quote
Old 17/05/2017, 11:14 AM   #4
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 577
Reputation: 53
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

Bad because no dm leave cmd, and many other things, What is the point of this:
Code:
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerControllable(i, 1);
SCMTA(-1,"{800080}[EVENT STARTED] {fef65b}An Administrator has Started the DM Event!");
GameTextForPlayer(i, "~W~EVENT ~Y~HAS ~G~BEEN ~B~STARTED!",3000,3);
if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "{f00f00}[ERROR]: {FFFFFF}You are not authorized to use this command!");
EventOpened[playerid] = 0;
InEvent[playerid] = 1;
}
}
__________________
coool is offline   Reply With Quote
Old 17/05/2017, 11:22 AM   #5
RxErT
Huge Clucker
 
Join Date: May 2016
Location: SA:MP Lemon
Posts: 249
Reputation: 12
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

Quote:
Originally Posted by coool View Post
Bad because no dm leave cmd, and many other things, What is the point of this:
Code:
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerControllable(i, 1);
SCMTA(-1,"{800080}[EVENT STARTED] {fef65b}An Administrator has Started the DM Event!");
GameTextForPlayer(i, "~W~EVENT ~Y~HAS ~G~BEEN ~B~STARTED!",3000,3);
if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "{f00f00}[ERROR]: {FFFFFF}You are not authorized to use this command!");
EventOpened[playerid] = 0;
InEvent[playerid] = 1;
}
}

It's meant to unfreeze all Players whom in the dm event.

EDIT: and if you would i'll add /leavedm command.
RxErT is offline   Reply With Quote
Old 17/05/2017, 11:22 AM   #6
Infinity
High-roller
 
Infinity's Avatar
 
Join Date: Jul 2009
Posts: 1,229
Reputation: 975
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

Quote:
Originally Posted by RxErT View Post
Hello Infinity, i can't see any poor indentation can you mark them if you could please
Any time you, for example, notice multiple brackets under eachother like this:
Code:
}
}
you know it's badly indented. The basic rule is to always indent one 'step' when you use an opening bracket, and to go back one step when using a closing bracket.
__________________

I apologize for the stupidity of my fellow members

Quote:
Originally Posted by !damo!spiderman View Post
Stand for something that's going to help the world rather than fill it with more hate. Give someone a hug, tell someone you care... Do something, do anything but do it with love not hate.
Infinity is offline   Reply With Quote
Old 17/05/2017, 11:32 AM   #7
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 577
Reputation: 53
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

PHP Code:
for(new 0i<MAX_PLAYERSi++) //Use GetPlayerPoolSize
{
if(
IsPlayerConnected(i))
{
TogglePlayerControllable(i1);
SCMTA(-1,"{800080}[EVENT STARTED] {fef65b}An Administrator has Started the DM Event!");//This will send every
 
one a message multiple time forexample if 50 players are connected it will show message to everyone 50 time.
GameTextForPlayer(i"~W~EVENT ~Y~HAS ~G~BEEN ~B~STARTED!",3000,3); //Use GameTextForAll (outside the loop
if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1"{f00f00}[ERROR]: {FFFFFF}You are not authorized to use this command!"); //Why are you checking admin in a `for` loop
EventOpened[playerid] = 0//This must be out side from the `for` loop.
InEvent[playerid] = 1//This too
}

Will become good if you fix many things
__________________
coool is offline   Reply With Quote
Old 17/05/2017, 11:52 AM   #8
RxErT
Huge Clucker
 
Join Date: May 2016
Location: SA:MP Lemon
Posts: 249
Reputation: 12
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

Thanks Infinity and coool for teaching me!
i'll work on them in the up coming version!

by the way, i didn't know that if you like it or not i'd hear!
RxErT is offline   Reply With Quote
Old 17/05/2017, 05:06 PM   #9
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,920
Reputation: 258
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

PHP Code:
if(weapon || weapon 46) return SCM(playerid,-1,"{f00f00}[ERROR]: {F00f00}Invalid WeaponID"); 
Also id between 19 & 21 are invalid:
PHP Code:
IsValidWeapon(weaponid)
    return (
<= weaponid <= 46) && !(19 <= weaponid <= 21) ? true false
PHP Code:
      SetPlayerArmour(playerid100);
       
SetPlayerHealth(playerid100); 
It's better to write 100.0 since the parameter is a float. I know it's not very important but it's better to take a good habit.

PHP Code:
new InEvent[MAX_PLAYERS]; //Checking player if he is in/out event.
new EventOpened[MAX_PLAYERS]; //Checking if Event is opened to join it. 
This can be declared as a boolean and used as such.
Also declaring variables like this is more clear (it's my own opinion)
PHP Code:
new
    
FirstVariable,
    
SecondVariable,
    
LastVariable
__________________
actor_plus - v5.0.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is offline   Reply With Quote
Old 17/05/2017, 06:13 PM   #10
JustMe.77
Huge Clucker
 
JustMe.77's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 216
Reputation: 65
Default Re: DeathMatch Event [Friendly, Funny, Controllable]

Everytime you start an event, you create the Mappings.
Start a few Events and you'll have FPS Lags / reach the maximum create objects (1000)
JustMe.77 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Map] Dark NGC Commander (Controllable/Non-Controllable Alien Ship) AbyssMorgan Maps 3 17/06/2016 06:23 AM
[FilterScript] Event System Deathmatch ! TeddyYeah Filterscripts 4 31/08/2014 01:56 PM
[FilterScript] Funny DeathMatch (Fun DM) (SC)=Sky= Filterscripts 0 29/06/2013 02:04 PM
[Map] Building Top Deathmatch Event Ben_Gale Maps 5 04/12/2012 06:37 PM


All times are GMT. The time now is 07:19 PM.


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