SA-MP Forums Archive
[FilterScript] Dynamic Gate System V.2 by OsamaKurdi - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Dynamic Gate System V.2 by OsamaKurdi (/showthread.php?tid=653314)

Pages: 1 2


Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 01.05.2018

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.


Re: Dynamic Gate System V.2 by OsamaKurdi - CrystalGamer - 01.05.2018

good work.


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 01.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - MrAbaS - 02.05.2018

Nice.

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

What is name Folder?


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 02.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - Castiel17 - 02.05.2018

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 !!!


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 02.05.2018

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



Re: Dynamic Gate System V.2 by OsamaKurdi - Usmanmemon - 03.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 03.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - CrystalGamer - 04.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 12.05.2018

bump


Re: Dynamic Gate System V.2 by OsamaKurdi - TadePoleMG - 12.05.2018

NICE SCRIPT


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 12.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - RogueDrifter - 12.05.2018

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.


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 12.05.2018

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 💗


Re: Dynamic Gate System V.2 by OsamaKurdi - RogueDrifter - 12.05.2018

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.


Re: Dynamic Gate System V.2 by OsamaKurdi - Lokii - 12.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - Osamakurdi - 15.05.2018

Version edited and fixed unlimited timers depending on RogueDrifter reply.


Re: Dynamic Gate System V.2 by OsamaKurdi - AzaMx - 16.05.2018

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


Re: Dynamic Gate System V.2 by OsamaKurdi - RogueDrifter - 16.05.2018

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