Quantcast
Channel: SA-MP Forums - Filterscripts
Viewing all 595 articles
Browse latest View live

[FilterScript] Ticket System

$
0
0
TICKET SYSTEM


Hi, today i was boring so i make the basic ticket system.

Code:

//LETENKY
//BY DIIGNITY

#include <a_samp>
#include <zcmd>


forward EndTeleport(playerid);





//---------------------------------------------

public OnFilterScriptInit()
{
    CreatePickup(1239,1,1688.8159,-2237.5386,13.5396,-1);
          Create3DTextLabel("/buyticket",0xFF0000AA,1688.8159,-2237.5386,13.5396,30,0,0);
}

//---------------------------------------------

CMD:buyticket(playerid, params[])
{
    if (IsPlayerInRangeOfPoint(playerid, 7.0, 1688.8159,-2237.5386,13.5396))
    {
        ShowPlayerDialog(playerid, 888, DIALOG_STYLE_LIST, "Tickets", "Desert Island (500$)", "Select", "Quit");
    }
    else
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "You are not near place to buy the ticket!");
    }
    return 1;
}

//---------------------------------------------

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 888)
        {
                if(response)
                {
                        if(listitem == 0)
                        {
                        if(GetPlayerMoney(playerid)>=500)
                        {
                SendClientMessage(playerid, 0xFFFFFFFF, "You buy ticket to the Desert Island");
                SetPlayerPos(playerid, 1.808619,32.384357,1199.593750);
                SetCameraBehindPlayer(playerid);
                SetTimerEx("EndTeleport", 10000, false, "i", playerid);
                GivePlayerMoney(playerid,-500);
                        }
        }
    }
   
}
        return 0;
}

//---------------------------------------------

public EndTeleport(playerid)
{
    SetPlayerPos(playerid, -699.1899,-7450.6929,37.9266);
    SendClientMessage(playerid, 0xFFFFFFFF, "((PLANE)) The plane landed, we wish you a nice day.");
    return 1;
}

Pastebin: https://pastebin.com/LefGnPAs

[FilterScript] All Animations [Good for roleplay servers]

[FilterScript] [v1.0] Zoneo's Waypoint System [MySQL]

$
0
0
Zoneo's Waypoint System


Description

This simple filterscript uses a MySQL database to allow users to teleport between places on the map. It allows users to do the following:
  • Create a location to allow anybody to teleport to it.
  • Teleport to any created location.
  • Teleport other players to any location.
  • See the stats about the locations (To see how many times each is used, for example)
  • Delete any location.

All of this can be done in-game.

Commands
  • /gotoloc [location] - Teleport to a selected location
  • /sendtoloc [playerid] [location] - Send another player to a location
  • /gotolochelp - Lists all commands and locations
  • /locations - Lists all commands and locations
  • /createloc [name of new location] - Create a new location
  • /deleteloc [name of location] - Delete a location
  • /locstats [name of loation] - Get the statistics for a location

Examples and Screenshots

Click here for video
Click here for the screnshot album



Much more detail, including a full installation guide, a troubleshooting guide and more support can be found on the Github page, along with the download. Before installing the filterscript, I'd recommend you read the Installation section.

Download

I created this filterscript over a year ago, and I decided to share it with the community as I couldn't find any others which had the same functionality. Let me know what you think.

[FilterScript] Vote-Kick System By HoussamMaroc[Second FS]

$
0
0

IMAGES






CMDS
/votekick [playerid]
/vote (after typing /vote click on 'Y' To Vote Yes & 'N' To Vote No)
DOWNLOAD
PHP Code:

Credits:
Zeex "ZCMD"
Y_Less "SSCANF,FOREACH" 

Note: The Script Can't Work If You Don't Have sscanf.dll in "plugins" Folder

[FilterScript] Group System (2). [MySQL\Dynamic Rank and permission system]

$
0
0
Group System (2) Beta

Note: The script is currently in beta stage and therefore buggy.

Introduction

My original plan was to create a group system which would support multiple(10) groups per player at a time but i cancelled my work on it as the requirement for my server was changed(however it is still uploaded below) and with that i came with some minor adjustments. I actually wanted to create a system in which a player could have as many ranks as he desires for his group and each with it's own special permissions and level. Although, i have come along a long way but there is still some polishing to be done and bugs to be fixed.

MySQL Table Structure

My Group system currently uses 3 tables.

Groups2 which contains all of the data relating to the group.
Code:

gID
gName
gLeaderName
gChat
gCredits //additional stuff
gResources
gWarWins
gWarLosses
gDraws
gScores

Players2, containing data of the players. Used for detecting player's group.
Code:

pID
pName
grouppid
prID
groupcontribution
gWarKills
pGroups

Lastly Ranks2. Containing permission and other group relating data.
Code:

rID
rgID
rName
rLevel
rPermission1,2,3,4,5

Commands

Following are the commands scripted into the Filterscript.
Code:

/groups - Lists available groups.
 /groupinfo(ID) - Get GroupInfo by either ID or Name.
 /creategroup - You must be a rcon admin to use this command.
/groupinvite - For Group Leaders or those with special permission.
/g - Group Chat
/groupkick - For Leader and those with special permission.
 /groupranks - Display's group rank (bugged atm)
/GroupEditRank
/GroupSetRank
/GroupChatLock

Thanks To
Code:

SAMP Team for everything.
Y_Less for y includes and sscanf.
Zex for zcmd

Bugs
There are many bugs which needs to be fixed.

[FilterScript] Simple votekick system

$
0
0
This filterscript create by Turbo, Simple but usefull



Commands:
/votekick <ID> <Reason>




Pastbin
https://pastebin.com/TP1s1veE

You can try it in your server and Sorry there is no screenshots/Video..

And don't forget to rep me !

[FilterScript] Login/Register System [MySQL R41-2] + unique TextDraws

$
0
0
Hey there,

I'm re-releasing today another script modified by me. I've added my TextDraw Layout to a login/register system which was made originally by Jeffry.

Previous Release

[FilterScript] http://forum.sa-mp.com/showthread.php?t=629838


Information

Well, I thought why not combining both systems? It's just a basic Login/Register System, but together with the textdraws, you can make something useful with it.
My previous topic is linked below.

Here are a few Screenshots (different colors):



Requirements

Credits

Download

End

Hope you guys like it, keep in mind that this is just a BASIC Login/Register System, but I'd appreciate your feedback.

[FilterScript] Dynamic Object System

$
0
0
So I've been scripting for my own game mode and I wanted to make this so I and my mappers will be able to add some stuff InGame easly, So yeah, Why don't i share it for everyone? So it will store the coordinates of the object in a .ini file, And store some information. You will be able to know who created the object and when (DD/MM/YYYY) and if the object is edited (Pos.) You will be able to know who edited it.
So when I was a beginer at Pawn, I thought it will be a hard work but it was an easy one. I hope that some new guys will be able to learn from this and even improve it.
Finaly, Please keep the credits. If you spotted a bug or have a suggestion, Explain it in a reply here or just PM me. I'll work on it. Till now I didn't find any bug.

Don't forget to rep. !! Thank you!

Commands:
  • /createobject - To add a new object
  • /delobject - To remove an object
  • /editobject - To edit an object (Pos)
  • /gotoobject - To TP To an object
  • /objectinfo - To check the object's information.
  • /oused- To check the objects used.
Youtube Video
Click Me
Pss I suck at creating/editing videos.

How To Install?
You need few includes:After adding these includes to your "Pawno\includes" folder, Simply add this FilterScript to your folder and server settingsAnd the final step is to create a folder with "ObjectsFile" as a name in your "scriptfiles" folder. Where the objects will be stored.

Credits
  • SA-MP Team - a_samp.inc
  • Y_Less and Emmet_ - Sscanf2.inc
  • ZeeX - Zcmd.inc
  • DracoBlue - Dini.inc

Note: If you add this to your server as a FilterScript restarting the server using gmx won't re-create the created objects, You have to add it to your game mode to fix this.

[FilterScript] ReturnDate

$
0
0
ReturnDate => Transfer time stamp to date

Hi, I'd like to introduce my version of the timestamp to date - ReturnDate.
I would like to thank in advance for your attention and patience in reading this long post, I tried to shorten it as much as possible so it was understandable and it had a head and a heel....

Why did I make my own version?
I'm developing my own mode, where I do not use foreign features other than plugins, I always try to do everything in my own right so that it is faster and, if possible, less burdensome than RAM or CPU than Internet versions.

While it is true that I test the cycle functions repeating 1,000,000x (to ensure the differences) and in practice they are triggered so they go, maybe 2x 3x, but it does not change that the code must be unclear and unnecessarily complicated when it It's easy....

In this case, after the experience and use of the TimestampToDate and 'date' functions, which often showed me a slightly different date than I had, I would make my own conversion to date...

What is the difference between the original and this version?

This version does not use unnecessarily two-dimensional variables (which store 12 months, for every 2 possible days of the month and a time stamp) as in the original versions.
The other and major difference is that the time stamp does not take place from January 1, 1970 00:00:00, but from the pre-set beginning of the year.
For example, the first registered X player will be on January 12, 2017 (time is not important) and I know that the server will no longer store any older data but always newer (later registered, timeban, ...).

That's why we set the FYear in 2017; FStamp as a time stamp for midnight 1.1.2017 (possible to get HERE, it is necessary to add 7200 -> 2 hours, CET) to the resulting timestamp.

When invoking the function, it will skip to the specified part, which is the beginning of 2017, and the calculation of the remaining time stamp continues.
First, the subtraction cycle of the year starts (if at least 1 year is available), then continues to find the months (at this step there is no cycle but as we know that there are 12 months remaining, then we will examine them once if it is found that No more available, jumps to classic cycles that count days, hours, minutes, and the rest are seconds.

Advantages and disadvantages?

The benefits of this release are faster execution and less RAM usage.
The disadvantage is that the function does not detect older data than the one defined in the block (which actually ensures faster execution).

Speed test.

I compared the speed of all 3 functions in the 1.000.000 cycle - ReturnDate, TimestampToDate, and Date.

PHP Code:

ReturnDate:        1749 |  709 |  1809 ms (average:  1423 ms)
TimestampToDate:   3568 2167 |  3454 ms (average:  3063 ms)
date:             37637 9752 37344 ms (average28245 ms

PHP Code:

#define    FYear 2017
#define    FStamp 1483221600 //01.01.2017 00:00:00 (1483228800) - 7200 (2 Hours = CET)

stock ReturnDate(ts, &rday, &rmonth, &ryear, &rhour, &rminute, &rsecond)
{
    
rday 1rmonth 1ryear FYear;
    
ts -= FStamp;
    new 
bool:lp false;

    if((
ryear == && ( ryear 100 != || ryear 400 == ))) rday 0;
    
    while(
ts 31535999)
    {
        
ryear++;
        if((
ryear == && ( ryear 100 != || ryear 400 == ))) { ts -= 31622400lp true; }
        else { 
ts -= 31536000lp false; }
    }

    if(
ts 2678400) goto next;
    
ts -= 2678400;
    
rmonth++;

    if(
lp == true)
    {
        if(
ts 2505600) goto next;
        
ts -= 2505600;
    }
    else
    {
        if(
ts 2419200) goto next;
        
ts -= 2419200;
    }
    
rmonth++;

    if(
ts 2678400) goto next;
    
ts -= 2678400;
    
rmonth++;

    if(
ts 2592000) goto next;
    
ts -= 2592000;
    
rmonth++;

    if(
ts 2678400) goto next;
    
ts -= 2678400;
    
rmonth++;

    if(
ts 2592000) goto next;
    
ts -= 2592000;
    
rmonth++;

    if(
ts 2678400) goto next;
    
ts -= 2678400;
    
rmonth++;

    if(
ts 2678400) goto next;
    
ts -= 2678400;
    
rmonth++;

    if(
ts 2592000) goto next;
    
ts -= 2592000;
    
rmonth++;

    if(
ts 2678400) goto next;
    
ts -= 2678400;
    
rmonth++;

    if(
ts 2592000) goto next;
    
ts -= 2592000;
    
rmonth++;

    if(
ts 2678400) goto next;
    
ts -= 2678400;
    
rmonth++;

    
next:

    
rday += ts 86400;
    
rhour = (ts 86400) / 3600;
    
rminute = (ts 86400 3600) / 60;
    
rsecond = (ts 86400 3600 60);



The boys of my English are not so much so I use a translator

[FilterScript] [1st Filterscript] Toll system

$
0
0
Hello guys today i just tried to create a fs for the first time . I was making it for my server but i thought to release it as I dont need it anymore [was been used for a rp event] .I dont even have much time so i didn't change any thing + you need to change defines by your self when you will compile you are most likely to get 2 error NVM they are easy to fix this is my first fs took like 3 hours to complete :P i dont know if its something noob :P
Show you support by REP lol joking any comment will be appreciated
LINK: https://pastebin.com/uBSe8MCw

Attached Images
File Type: jpg gallery1.jpg (73.9 KB)
File Type: jpg gallery2.jpg (86.8 KB)
File Type: jpg gallery3.jpg (85.0 KB)
File Type: jpg gallery4.jpg (86.0 KB)
File Type: jpg gallery5.jpg (107.2 KB)

[FilterScript] H-Custom NameTags

$
0
0
Introduction
Hi everyone, I hope you have a good day ;).
Today i've created a Custom NameTags for my server, and i decided to release it to public !
Features
- Show the name of player
- Show his health
- Show his armour
- Show his status (AFK / Active)
Screenshots

Download
Github
Installation
- Download the files
- Put it in the filterscripts folder of your server
- Open server.cfg and put in line filterscript :
Code:

filterscript customname
- Open your server and done ! :D
Credits
- SA-MP Team - All :D
- Emmet_ - Callbacks include
- Me - Creating this filterscript
Bugs
Currently there is no bugs, if u find a bug please report it here.

[FilterScript] a_zones /fs

[FilterScript] AFK System

$
0
0
AFK System

Hello, this is my first filterscript here, it was first a newbie script with normal stuff, now i updated it to do some extra stuff.

Commands:

/afk & /back

What does it do?

When AFK:


1. It freezes you
2. It sets your color to Yellow
3. It shows you some textdraws
4. Creates a 3d label above you
5. Sets your skin to CJ
6. Does not allow you to talk while AFK

When coming back from AFK:


1. It un-freezes you
2. It sets your color to your old color
3. Sets your skin to your old skin
4. Allows you to talk normally again

Links:

Old version: https://pastebin.com/ZPJi9ffu
Current version: https://pastebin.com/YfGiwmB6

Thanks for the nice feedbacks on the previous version, and thanks for the ideas :)

[FilterScript] H-Fishing System

$
0
0
Introduction
A month ago, i have created this fish system for my RP server. My server went down and i will not run it. So i decided to release this as public.
Features
- Fishing system like the one in LS-RP
- Unloading fish
- Rods
- Fish limit
Download
Github
Credits
- SA-MP Team - a_samp
- Zeex - ZCMD
- Iconginto - Streamer
HoussemGaming - Making this :D
Bugs
There is currently no bugs, if you have a suggestion or a bug put it here :D
i hope you love it

[Tutorial] Anti Crasher for SA:MP 0.3.7 R2

$
0
0
hi guys!
This code will protect you from 2 types of crashers:

1. "Bullet Crasher" - s()beit blue eclipse v5
2. "Bad Vehicle Crasher" - s()beit OverLight V3
Copy this code and put it in gamemode!
Author of Anti Crasher, it's me!



PHP Code:

public OnPlayerUpdate(playerid)
{
    static 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playerid,x,y,z);
    if 
== -5.5 || !(-1000000.0 <= <= 1000000.0) *then {
        new 
TipCrasher[20];
        if 
== -5.5 *then{
            
TipCrasher="BulletCrasher";
        }else{
            
TipCrasher="BadVehicleCrasher";}
        new 
string[144],name[MAX_PLAYER_NAME],ip[16];
        
GetPlayerName(playeridnamesizeof(name));
        
GetPlayerIp(playeridipsizeof(ip));
        
format(string,sizeof(string),"{FF0000}|Anti-CrasherHack By [MD]_Shift|: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}|Reason: %s|",name,playerid,TipCrasher);
        
SendClientMessageToAll(-1,string);
        
printf("[%s] Nick: %s Ip: %s",TipCrasher,name,ip);
        
Kick(playerid);
        return 
false;
    }
    return 
true;



[FilterScript] Butcher Job on the conveyor (ENG/RUS)

$
0
0
Butcher Job on the conveyor.

Description:
The factory is located in the village of Montgomery.
Your task is to throw out spoiled meat from the conveyor by pressing Y.

For the script to work you need streamer!

Screns:
http://i.imgur.com/9XBotWy.jpg
http://i.imgur.com/CI81oMw.jpg
http://i.imgur.com/NNh1pL1.jpg
http://i.imgur.com/7vOO1dP.jpg

Video (Russian):
https://www.youtube.com/watch?v=wya-ZxwrbN8

Credits: Me
Download:
Pastebin (RUS)
Pastebin (ENG)
MediaFire (RUS)
MediaFire (ENG)


P.S: the English translation may not be accurate. Sorry)

[FilterScript] Hunting System

$
0
0
Hello, I would like to present you the Hunting System.

Video:
https://www.youtube.com/watch?v=gySSTtjFRB0

Functions:
PHP Code:

Hunting::Create(type,Float:x,Float:y,Float:z,Float:health,respawntime,worldid=-1,interiorid=-1,playerid=-1,Float:streamdistance=200.0,moving_area 0);
Hunting::Respawn(mobid);
Hunting::Destroy(mobid);
Hunting::Kill(mobid,playerid);
Hunting::GetKey();
Hunting::SetKey(key);
Hunting::SetDrop(mobid,drop);
Hunting::GetDrop(mobid);
Hunting::GetPos(mobid,Float:x,Float:y,Float:z);
Hunting::Count(); 

Callbacks:
PHP Code:

OnPlayerTakeHuntDrop(playerid,mobid,drop);
OnPlayerKillHuntAnimal(playerid,mobid);
OnPlayerApproachingAnimal(playerid,mobid,mob_state);
OnAnimalTakeDamage(mobid,playerid,Float:amount,weaponid);
OnHuntAnimalRespawn(mobid); 

Definitions:
PHP Code:

//Config
MAX_HUNTING_ANIMALS     //default is 100 allowed to redefine
HUNTING_UPDATE_INTERVAL //default is 500 allowed to redefine

//Animal types
HUNTING_TYPE_COW
HUNTING_TYPE_DEER

//Animal state
HUNTING_STATE_DESTROYED //animal not exist
HUNTING_STATE_SPAWNED   //animal is spawned
HUNTING_STATE_DEAD      //animal is dead

//Other
INVALID_HUNTING_ID
HUNTING_NO_AUTO_RESPAWN 
//disable auto respawn (respawntime param) 

Example Pawn Code:
PHP Code:

#include <a_samp>
#include <streamer>
#include <ColAndreas>
#include <SAM/3DTryg>
#include <Hunting>

public OnFilterScriptInit(){

    new 
my_zone CreateDynamicRectangle(-100.0,-100.0,100.0,100.0);
    for(new 
05i++){
        
Hunting::Create(HUNTING_TYPE_COW,0.0,0.0,3.0,55.0,30,.moving_area=my_zone);
    
        
Hunting::Create(HUNTING_TYPE_DEER,5.0,0.0,3.0,55.0,30,.moving_area=my_zone);
    }

    return 
1;
}

public 
OnPlayerTakeHuntDrop(playerid,mobid,drop){
    
    if(
drop){
        
SendClientMessage(playerid,-1,"You received $2500");
        
GivePlayerMoney(playerid,2500);
        
Hunting::SetDrop(mobid,0);
    }
    return 
1;
}

public 
OnPlayerKillHuntAnimal(playerid,mobid){
    
    
SendClientMessage(playerid,-1,"Animal has been killed !");
    
    return 
1;
}

public 
OnPlayerApproachingAnimal(playerid,mobid,mob_state){

    if(
mob_state == HUNTING_STATE_DEAD){
        
SendClientMessage(playerid,-1,"Press Y to raise prize.");
    }
    
    return 
1;
}

public 
OnAnimalTakeDamage(mobid,playerid,Float:amount,weaponid){
    
    if(
weaponid != 34) return 0//sniper only :D
    
    
return 1;
}

public 
OnHuntAnimalRespawn(mobid){
    
    return 
1;



Download:
Hunting.inc GitHub / Abyss Morgan Website
3DTryg.inc GitHub / Abyss Morgan Website Thread
ColAndreas Plugin Thread

Notice:
Filterscript not exist because filterscripts have limits.
This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


Non-Registered Users:
Bug Report

[FilterScript] Simple Pool Minigame Filterscript (prototype line 200)

[FilterScript] [JOB] Simple "Flint Country Trucking" Job

$
0
0
Introduction
Hello, my name is Angelo Brand and i think this is my first Job Filterscript. Actually i have made this about 2 month ago but i haven't post because i left samp for a moment. But now i see this script back and decide to post it here. Iam so glad if you guys like this script and maybe nextime i will make some new good stuff and then i will post it here.

How it works ?
This is an trucking mission job. You can start the mission by entering the Yankee (you can change the model of any cars you want) cars at Trucking depot, Flint Country. When u entering the car, the a message will send to you and all player. Only you have to do is go to the checkpoint to start earn money. The mission will be failed if you left or get out from the car. If you already finish the job then will give you money $10,000 (you can change this as much you want).

Trucking Location



Any Screenshot ?









Download Link

https://pastebin.com/L6n0HdD6

Cover

I think thats all the information about my first Filterscript. I hope you guys like the script and if you like and enjoy, then please give me some comment or suggestion to growing me make more better. Thanks and sorry for my bad english :D :D :D.

[FilterScript] Simple VIP System

$
0
0
Simple VIP System
by: James_Barnes(OfekEfron).


Lines: 137
Bugs: 0 (replay me if you find something i will fix it)
Pastebin: Here
Viewing all 595 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>