[FilterScript] Dynamic Gate System V.2 by OsamaKurdi
#1

Introduction
This is gate system version 2,
version 1 is deleted so don't try to find it.
This gate system is really developed than version 1.


Features
1)Auto(OPEN|| CLOSE) gate.
2)Gate's speed.
3)Password for gate.
4)Auto open by Horn.
5)Edit open and close positions.
6)Select gate to edit in editgate command

Commands
1_ /creategate with parameters (to create a gate)
2_ /removegate here you can select on game which gate you want to remove.
3_ /gate to open or close gate.
4_ /editgate <speed || password || autogate || open || close> to edit gate settings.
5_ /gotogate to teleport a choice gate.
6_ /nearestgate

How to download
1-download the code from pastebin.
2-paste code to filterscripts.
3-make sure that extension is .pwn not .txt .
4-run code and compile it.
5-open scriptfiles and create a new Folder called Gates G is capital letter
6-open server.cfg type at filterscripts "gate-v2".
7-now run server and game start by typing /creategate

What do you need
1-zcmd
2-dini
3-sscanf2

Credits for all creators of those includes


Download
https://pastebin.com/3giBhs77
Note:version edited and fixed unlimited timers depending on RogueDrifter reply.

The end.
Reply
#2

good work.
Reply
#3

Quote:
Originally Posted by CrystalGamer
View Post
good work.
Thanks
Reply
#4

Nice.

5-open scriptfiles and create a new Folder called Gates G is capital letter

What is name Folder?
Reply
#5

Quote:
Originally Posted by MrAbaS
View Post
Nice.

5-open scriptfiles and create a new Folder called Gates G is capital letter

What is name Folder?
Thanks
Gates
Reply
#6

Quote:
Originally Posted by Osamakurdi
View Post
Introduction
This is gate system version 2,
version 1 is deleted so don't try to find it.
This gate system is really developed than version 1.


Features
1)Auto(OPEN|| CLOSE) gate.
2)Gate's speed.
3)Password for gate.
4)Auto open by Horn.
5)Edit open and close positions.
6)Select gate to edit in editgate command

Commands
1_ /creategate with parameters (to create a gate)
2_ /removegate here you can select on game which gate you want to remove.
3_ /gate to open or close gate.
4_ /editgate <speed || password || autogate || open || close> to edit gate settings.
5_ /gotogate to teleport a choice gate.
6_ /nearestgate

How to download
1-download the code from pastebin.
2-paste code to filterscripts.
3-make sure that extension is .pwn not .txt .
4-run code and compile it.
5-open scriptfiles and create a new Folder called Gates G is capital letter
6-open server.cfg type at filterscripts "gate-v2".
7-now run server and game start by typing /creategate

What do you need
1-zcmd
2-dini
3-sscanf2

Credits for all creators of those includes


Download
https://pastebin.com/3giBhs77

The end.
you cant edit position of gate !!!
Reply
#7

Quote:
Originally Posted by Castiel17
View Post
you cant edit position of gate !!!
You can edit by typing:
/editgate open
/editgate close
Reply
#8

Quite Similar to this one: https://sampforum.blast.hk/showthread.php?tid=594894
Reply
#9

Quote:
Originally Posted by Usmanmemon
View Post
Yea but of course different code and also +FEATURES
Reply
#10

i can say different code but not FEATURES becuz you just added an automatic gate only nothing else
and good job
Reply
#11

bump
Reply
#12

NICE SCRIPT
Reply
#13

Quote:
Originally Posted by TadePoleMG
Посмотреть сообщение
NICE SCRIPT
Thanks wish you like it in game.
Reply
#14

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    
KillTimer(killtimer1);
    return 
1;
}
 
public 
OnPlayerSpawn(playerid)
{
    
killtimer1 SetTimerEx("auto"5001"i"playerid);
    return 
1;

WOW,

And people actually saying " NICE SCRIPT"

Man, learn what you're doing before you release it, the code i posted above is going to create endless timers until it fucks your server inside out, its not even per player, well AT LEAST kill it once someone dies, as if that's going to help too.
Reply
#15

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
PHP код:
public OnPlayerDisconnect(playeridreason)
{
    
KillTimer(killtimer1);
    return 
1;
}
 
public 
OnPlayerSpawn(playerid)
{
    
killtimer1 SetTimerEx("auto"5001"i"playerid);
    return 
1;

WOW,

And people actually saying " NICE SCRIPT"

Man, learn what you're doing before you release it, the code i posted above is going to create endless timers until it fucks your server inside out, its not even per player, well AT LEAST kill it once someone dies, as if that's going to help too.
Thanks for your notes.
You know why released that??
Cuz I need like those notes 💗
Reply
#16

Quote:
Originally Posted by Osamakurdi
Посмотреть сообщение
Thanks for your notes.
You know why released that??
Cuz I need like those notes 💗
Okay let me explain whats exactly wrong here, you created a per player timer and linked it to a global variable (not per player/no array) which means the variable's value is being OVERWRITTEN every time someone spawns = losing the last value of the created timer = endless timers.

How was this supposed to be done?

Create variable with MAX_PLAYERS array and kill it once they die or create it once they connect and kill it once they disconnect (makes sense?).

I didnt bother reading the rest of the code since i'm kinda busy and bored.
Reply
#17

why do you even use timers? you could use dynamic areas to check if player is near gate
Reply
#18

Version edited and fixed unlimited timers depending on RogueDrifter reply.
Reply
#19

It's not that bad nor It's not that good. It's a great effort but I hope this script will be improved.
Reply
#20

Quote:
Originally Posted by Osamakurdi
Посмотреть сообщение
Version edited and fixed unlimited timers depending on RogueDrifter reply.
Код:
public OnPlayerSpawn(playerid)
{
    killtimer1[playerid] = SetTimerEx("auto", 500, 1, "i", playerid);  
    return 1;
}
Move this to OnPlayerConnect
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)