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

[FilterScript] Talking to people in RP way [RolePlay Servers]

$
0
0
Talking in RP way




Hello guys I am Star, and I am new scripter. I was bored so I decieded to make an easy script about how to speak with players in RP way.Like when you write something at chat it won't be like DM chat anyone can see it, only people who are near will see what you wrote, it's very easy I hope it will be useful!

Includes
1. a_samp
2. Foreach by Y_Less. // link : https://github.com/Misiur/YSI-Includes/tree/YSI.tl


Code:

#include    <a_samp>
#include.  <foreach>

public OnPlayerText( playerid, text[ ] )
{
    new
        szStr[ 128 ], pName[ 24 ];

    GetPlayerName( playerid, pName, sizeof pName );

    format( szStr, sizeof szStr, "%s said : {FFFFFF}%s.", pName, text );

    new Float: X, Float: Y, Float: Z; GetPlayerPos( playerid, X, Y, Z );

    foreach (Player, i)
    {
        if ( IsPlayerInRangeOfPoint( i, 10.0/*range*/, X, Y, Z ) )// CHANGE THE 10.0 IF YOIU WANT TO CHANGE THE RANGE.
        {
            SendClientMessage( i, 0xAAAAAAAA, szStr );
        }
    }

  return 0; // Won't send the original message.
}


[FilterScript] Shooting range + Interiors help + Cash textdraw

$
0
0
Hey hi hello once again, after the warm welcome and heart whelming comments and support over my past 2 releases i decided to
make a release once more :picard: (thanks xeon)
I've come to you with a work of about 300 lines, the title breaks it down yes its a filterscript that contains a cash textdraw such as the following :
For more info what happens is you replace all of your GivePlayerMoney to ShowCashTDraw by CTRL+H and
this little textdraw will appear every time u gain cash (only stays for 2 seconds)
regardless of the amount
whether it be negative or positive it works I've tested it so just take out the functions i put in the filterscript regarding that and use them this way, i mean im sure many ppl can create a textdraw but idk
this can be useful to let the players know the amount they gained if you're not sending client messages? and i
like how it looks lol its up to you to use have fun.
====This part you're free to ignore as
it might not be very useful======

Second thing is the interiors help, this is totally entitled to you as well, i wasn't even planning on putting this out
but i just used it as to help me with the next objective ( the shooting range) and its good for starters basically
just making it easier to enter and exit an interior u can use it as ur interiors system if u havent got one or for
test purposes it only takes one line if its a simple one or more lines if you want special functions for that
interior (you'll know what i mean by looking at the script) so yeah one cmd /allinteriors to lock all interiors created using this (for rcon) just putting it out there for ppl to use if needed, here's the syntax :
PHP Code:

EEI(playerid,InteriorID,Float:ix,Float:iy,Float:iz,Float:x,Float:y,Float:z,Float:rot,Interior,World,PerviousWorld); 

And here's the explanation for that syntax :
PHP Code:

/*Use interiors more than once safely and effectively, USEAGE:
playerid --> the player id to teleport inside the desired interior
InteriorID --> the id of the interior for separating them and controlling each on its own ( NOT THE ACTUAL INTERIOR ID)
Float:ix --> the x place to create the interior pickup (the position where the player ENTERS FROM)
Float:iy --> the y place to create the interior pickup (the position where the player ENTERS FROM)
Float:iz --> the z place to create the interior pickup (the position where the player ENTERS FROM)
Float:x --> the x place to TELEPORT the player to ( the interior )
Float:y --> the y place to TELEPORT the player to ( the interior )
Float:z --> the z place to TELEPORT the player to ( the interior )
Float:rot --> the angle heading to make the player look at when he enters the interior
Interior --> the interior you want the player to enter (THE ACTUAL INTERIOR ID)
World --> the world to set for that player once he enters the interior to be able to use that interior later on
Pervious World --> the pervious world the player was just into the moment before he entered the interior ( 0 for enter, custom for exit)
Lock Status --> you can implement the function by an admin to lock/unlock an interior to be enter-able or not, return it 1 to lock & vise versa.
EX: EEI(playerid,CURRENT INTERIOR,IamAtX,IamAtY,IamAtZ,GotoX,GotoY,GotoZ,GotoR,GotoINTERIOR,GOTOWORLD,iWasInWorld);
can be used by linking it to a timer called every second or put it under onplayerkeystatechange and link it to a key(the way i use it)
NOTE: Create your pickup based on the ix,iy,iz floats.
EX: CreatePickup(pickupID, type, ix,iy,iz, world);*/ 

Honestly if u find it too confusing for you just ignore it and extract the code u want out of the filterscript and edit/add things to it i totally don't mind, here's the function:
PHP Code:

public EEI(playerid,InteriorID,Float:ix,Float:iy,Float:iz,Float:x,Float:y,Float:z,Float:rot,Interior,World,PerviousWorld)
{
    if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && IsPlayerInRangeOfPoint(playerid,3.0,ix,iy,iz) && GetPlayerVirtualWorld(playerid) == PerviousWorld && !LockStatus) {
    if(
InteriorID == && !shootingrange) { //your custom interior id install here
    
if(!InRange[playerid]) InRange[playerid]=true;//related to the zoom in on shoot for the SR(shooting range)
    
else InRange[playerid]=false;//save as above ( see what i meant by special functions to the interior?)
    
SetPlayerPos(playerid,x,y,z);
    
SetPlayerVirtualWorld(playerid,World);
    
SetPlayerFacingAngle(playerid,rot);
    
SetPlayerInterior(playerid,Interior); }// now we finished the first interior (shooting range) read below to understand more about the shooting range.
    //EX: else if(InteriorID == 2) { //do stuff here } return 1; //done
    
}
    return 
1;


hope this has helped you somehow...
=====Shooting Range=======
now coming to the last thing which is the shooting range, i don't see many of those on here i did see like 3-4 but
they weren't the same so here's what this is about, first you can bring the shooting range building (dome) up/down
by MoveDynamicObject ( i used streamer yes) to be able to close/open that shooting range that might help people, if u see it to be useless to u just ignore those 2 cmds or even remove them, second of all i acquired help from a function and a code that were made by Lorenc_ & kadaradam , everything about their credits is mentioned in the filterscript itself including the links to their posts, back on topic: you can also move the objects u shoot at by pressing L-ALT while standing into the booth, you can also see where u shot
the target using the bullet cam code( which was made by kadaradam who used Lorenc_ SetObjectFacePoint function, confusing? eh) anyway yes i will update a few shots you'll see it down there of how this shooting range goes, the thing here is once u shoot the object its destroyed so i stacked up 2 targets onto each other
in the 3 targets i added in the shooting range ( the objects will be there once a player re-enters the shooting range) if you can edit that and bend it to ur will you're free to do so, to avoid
more chatter and making the post longer than it already is the cmds are /gotosr , /brintgsrup and /bringtsrdown (the names explain it) only rcon admin as always change that to ur admin system, please report any bugs found or any suggestions u have that u think can make me improve this, thanks, enjoy it.
shooting range shots:
What you can do with this is either link it to a score system or just make it a hangout for a certain level of players.
=====PASTEBIN:=====
Pastebin Link
=== Was going to release all of this yesterday but wrote such an
essay and shut the browser then BAM all is lost,
This'll be the last of me for a bit although I've got
one more idea but busy these days so maybe later, i will
upload files for those who seek direct test, all comments/suggestions/reports are welcome, hope you guys find this one useful.

Credits:

Zeex for ZCMD
Incognito for Streamer
kadaradam for Bullet Cam code
Lorenc_ for SetObjectFacePoint
Me and the original SA-MP provides for the rest.

==============================

Attached Files
File Type: amx SR+IH+CTD.amx (13.4 KB)
File Type: pwn SR+IH+CTD.pwn (13.4 KB)

[FilterScript] Dynamic Update System

$
0
0
INTRO:
Basically it's an simple filterscript which allow you in game to add/remove/edit updates list.

COMMANDS:

/addupdates (rcon admin command!)
/delupdates (rcon admin command!)
/editupdate (rcon admin command!)
/updates
/maxupdates (rcon admin command!)


SCREEN SHOTS:

(Upload Soon!)

DOWNLOAD LINK:

PASTEBIN


No bugs founded yet if you found please infom me Thanks you.

[FilterScript] Countdown in circle textdraw

$
0
0


Well, a few months ago, I made a count in textdraw with main idea of GTA V.



Let's do it


PHP Code:

//At first

#include a_samp
#include zcmd

#define BGColour -1

new 
Global_countdown[4],
Text:TextDraw_countdown[2]; 

In OnGameModeInit


PHP Code:

public OnGameModeInit()
{
TextDraws();
return 
1;


In the command


PHP Code:

CMD:conteo(playeridparams[])
{
    if(
sscanf(params"d"params[0]))
       return 
SendClientMessage(playerid,-1"{999999} Use /countdown [SECONDS] >> example: /countdown 4");

    if(
params[0] < || params[0] > 10)
       return 
SendClientMessage(playerid,-1"{999999}The seconds for a countdown, are between (3 - 10).");

    if(
Global_countdown[2] > || Global_countdown[2] == -1)
       return 
SendClientMessage(playerid,-1"{999999}Countdown in progress."),PlayerPlaySound(playerid,1085,0.0,0.0,0.0);

    new 
string1[650];
    
format(string1,sizeof(string1),"{F0F0F0}** %s start a countdown of a (%d) seconds.",PlayerName(playerid),params[0]);
    
SendClientMessageToAll(-1,string1);
    
Global_countdown[3] = SetTimer("ConteoA"1000true);
    
Global_countdown[2] = params[0];
    new 
string[10];
    
format(stringsizeof(string), "%d"Global_countdown[2]);
    
TextDrawSetString(TextDraw_countdown[0], string);
    
TextDrawShowForAll(TextDraw_countdown[0]);
    
TextDrawShowForAll(TextDraw_countdown[1]);
    
PlayerPlaySoundForAll(10560.00.00.0);
    return 
1;


At the end

PHP Code:

stock TextDraws()
{
TextDraw_countdown[0] = TextDrawCreate(320.000396100.499938"5");
TextDrawLetterSize(TextDraw_countdown[0], 0.7831183.017499);
TextDrawTextSize(TextDraw_countdown[0], 145.241561303.916381);
TextDrawAlignment(TextDraw_countdown[0], 2);
TextDrawColor(TextDraw_countdown[0], -1);
TextDrawSetShadow(TextDraw_countdown[0], 0);
TextDrawSetOutline(TextDraw_countdown[0], 1);
TextDrawBackgroundColor(TextDraw_countdown[0], 51);
TextDrawFont(TextDraw_countdown[0], 3);
TextDrawSetProportional(TextDraw_countdown[0], 1);

TextDraw_countdown[1] = TextDrawCreate(291.25000094.499923"ld_pool:ball");
TextDrawLetterSize(TextDraw_countdown[1], 0.4499991.600000);
TextDrawTextSize(TextDraw_countdown[1], 56.25000043.750015);
TextDrawAlignment(TextDraw_countdown[1], 1);
TextDrawColor(TextDraw_countdown[1], 65535);
TextDrawSetShadow(TextDraw_countdown[1], 0);
TextDrawSetOutline(TextDraw_countdown[1], 1);
TextDrawBackgroundColor(TextDraw_countdown[1], BGColour);
TextDrawFont(TextDraw_countdown[1], 4);
TextDrawSetProportional(TextDraw_countdown[1], 1);
return 
1;
}

forward ConteoA();
public 
ConteoA()
{

    if(
Global_countdown[2] == -1)
    {
        
TextDrawHideForAll(TextDraw_countdown[0]);
        
TextDrawHideForAll(TextDraw_countdown[1]);
        
TextDrawSetString(TextDraw_countdown[0], "~y~10");
        
TextDrawTextSize(TextDraw_countdown[0], 145.241561300.916381);
        
KillTimer(Global_countdown[3]);
        
Global_countdown[3] = 0;
        
Global_countdown[2] = 0;
        return 
1;
    }

    
Global_countdown[2]--;
    if(
Global_countdown[2] != 0)
    {
        switch(
Global_countdown[2])
        {
            case 
9:
            {
                
TextDrawShowForAll(TextDraw_countdown[1]);
                
TextDrawSetString(TextDraw_countdown[0], "~w~9");
                
TextDrawTextSize(TextDraw_countdown[0], 135.241561290.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
8:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~8");
                
TextDrawTextSize(TextDraw_countdown[0], 125.241561270.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
7:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~7");
                
TextDrawTextSize(TextDraw_countdown[0], 115.241561250.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
6:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~6");
                
TextDrawTextSize(TextDraw_countdown[0], 105.241561230.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
5:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~5");
                
TextDrawTextSize(TextDraw_countdown[0], 95.241561210.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
4:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~4");
                
TextDrawTextSize(TextDraw_countdown[0], 85.241561190.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
3:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~3");
                
TextDrawTextSize(TextDraw_countdown[0], 75.361633170.416439);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
2:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~2");
                
TextDrawTextSize(TextDraw_countdown[0], 65.241561150.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
            case 
1:
            {
                
TextDrawSetString(TextDraw_countdown[0], "~w~1");
                
TextDrawTextSize(TextDraw_countdown[0], 55.241561130.916381);
                
TextDrawShowForAll(TextDraw_countdown[0]);
                
PlayerPlaySoundForAll(10560.00.00.0);
            }
        }
    }
    else if(
Global_countdown[2] == 0)
    {
        
TextDrawSetString(TextDraw_countdown[0], "~w~0!");
        
TextDrawTextSize(TextDraw_countdown[0], 145.241561300.916381);
        
TextDrawShowForAll(TextDraw_countdown[0]);
        
PlayerPlaySoundForAll(1057,0.0,0.0,0.0);
        
Global_countdown[2] = -1;
    }
    return 
1;


Is everything. I accept a good ideas.

[FilterScript] Vehicle Speedo v0.1

$
0
0
AlexMSK's Vehicle Speedometer

Credits: to samp team for a_samp.inc


Images





Download

Pastebin

Any comment would be appreciated.
Enjoy!

[FilterScript] Dynamic Door System [Dini]

$
0
0
Dynamic Doors System Version:2


Commands
/createdoor [Rcon Admin]
/editdoor [Rcon Admin]


Introduction

Hello guys, this script has been created by me but the credits goes to RenSoprano because i edited his script in SII To DINI
So thanks if you like comments please.


Credits

RenSprano: SII Script
RoyalGamer: Converting from sii to dini
Streamer
Dini
Zcmd


Downloads

Pastebin

Bugs
Didn't found any, if you found please inform me.

[FilterScript] Christmas Quest - with MySQL

$
0
0
Christmas Quest - with MySQL R39



FilterScript - Christmas Quest [MySQL]
I recommend adding this filterscript to the gamemode to modify the prizes when completing the quest.

System Details:
> There are 50 gifts to be searched.
> To take a gift, use the F key.
> When you're near a gift, it will show you a textdraw to the left with a distance.
> /santahat to put santa hat.
> Save MySQL, all you need to find in the download link.

♣ Video: https://www.youtube.com/watch?v=3DtJDIclcbg
♣ Download: http://bit.ly/fs_quest

[Include] my error pwno

$
0
0
Hello to all the players
My problem at Pwno

PHP Code:

C:\Users\REVALS\Desktop\GAME MOD\New folder (3)\pawno\include\a_samp.inc(57) : error 021symbol already defined"print"
C:\Users\REVALS\Desktop\GAME MOD\New folder (3)\pawno\include\a_samp.inc(58) : error 021symbol already defined"printf" 

How to fix؟؟

[FilterScript] God System With Health & Armour Restore

$
0
0
Credits:
Zeex: ZCMD
Usmanmemon: GetpVarFloat & SetpVarfloat [helper]
RoyalGamer: scripting the god command

PHP Code:

/*                                  CREDITS
 *
 *                        RoyalGamer & Usmanmemon
 *
 */
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Simple God Command By RoyalGamer");
    print(
"--------------------------------------\n");
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

CMD:god(playeridparams[])
{

    if(
GetPVarInt(playerid"godmod") == 0)
    {
        new 
Float:healthsFloat:armours;
        
//Old Health
        
GetPlayerHealth(playerid,healths);
        
SetPVarFloat(playerid"health"healths);
        
//Old Armour
        
GetPlayerArmour(playerid,armours);
        
SetPVarFloat(playerid"armour"armours);
        
SetPVarInt(playerid"godmod"1);
        
SetPlayerHealth(playerid99999999);
        
SetPlayerArmour(playerid99999999);
    }
    else
    {
        
//Restore Health
        
SetPlayerHealth(playeridGetPVarFloat(playerid"health"));
        
//Restore Armour
        
SetPlayerArmour(playeridGetPVarFloat(playerid"armour"));
        
SetPVarInt(playerid"godmod"0);
    }
    return 
1;


[FilterScript] AFK/Back System

$
0
0
Introduction: hello guys this is my first filterscript because the first which i shared was a command but i am here
with afk/back system which i scripted in 20 Minutes.
i hope you will like this.

i wanna give some credits here
Credits:
Zeex: Zcmd
Usmanmemon: Giving IDEA for afk system
RoyalGamer: making this afk back system

Links: PasteBin

Pictures:


i hope this will better then old script.

[FilterScript] pickbox

$
0
0
UPDATED!

is being updated in please wait

[FilterScript] r_armour

$
0
0
This filterscript is GTA-V styled armour system. It replenishes your armour when it's lower than 20. It detects this from `OnPlayerGiveDamage > damagedid`.

For example,
PHP Code:

#define armourLight_PROTECTION 1 

This means your armour will only be replenished only ONCE, so in total it's 2 (one armour regularly, and one when it replenishes = 2)

There are 3 types of armour:
  • Light Armour
  • Standard Armour
  • Heavy Armour
#define armourLight_PROTECTION 1
#define armourStandard_PROTECTION 2
#define armourHeavy_PROTECTION 4




Credits:
<a_samp>
<izcmd> - originally by Zeex

Kar - Helped with an issue with bools, array

Pawn File:

Pastebin - https://pastebin.com/raw/LaQqE3RN
Hastebin - https://hastebin.com/raw/nifecosero

[FilterScript] BR Dynamic Rules System

$
0
0
Code:

//////////////////////    ///////////////////
  //                  //    //              //
  //                  //    //              //
  //                  //    //              //
  //                  //    //              //
  //                  //    //        //////
  /////////////////////      ////////////
  //                  //    //        //
  //                  //    //          //
  //                  //    //          //
  //                  //    //            //
  //                  //    //            //
  /////////////////////      //              //

Introduction: hey guys this script has been created by BulletRaja his account is not activated yet so he said me to release it and whole credits goes to him i just helped him in merandom

Credits:
BulletRaja [Inactivation] [Whole Credits]
Wherethescripters [Merandom] [Timer helped]
Cyber_Punk [Merrandom Include]
Incognito [sscanf2]
Zeex [ZCMD]

Pictures: COMING SOON

Downloads:
Click for merrandom include

CODE:
PHP Code:

/*
  //////////////////////     ///////////////////
  //                  //     //               //
  //                  //     //               //
  //                  //     //               //
  //                  //     //               //
  //                  //     //         //////
  /////////////////////      ////////////
  //                  //     //         //
  //                  //     //          //
  //                  //     //           //
  //                  //     //            //
  //                  //     //             //
  /////////////////////      //              //
  Bullet                      RAJA                  &          Wherethescripters
  cyber_punk: Merandom
  Zeex: ZCMD
  Incognito:  sscanf2
*/
//Merandom Download http://forum.sa-mp.com/showthread.php?t=109196
#define FILTERSCRIPT

#include <a_samp>
#include <sscanf2>
#include <Dini>
#include <zcmd>
#include <merrandom>
/* Dialogs */
#define    DIALOG_RULES                          1
#define DIALOG_RULE_DELETE                    2
#define DIALOG_RULE_DELETE_CONFIRM            3
#define DIALOG_RULE_VIEW                      4

/* Defines */
#define     MAX_RULES               10

/* folders & files */
#define rulesfolder "R"
#define rules       "rules"

/* COLORS */
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_RED 0xFF0000FF
#define COLOR_ORANGE 0xFF9900FF

/* Automatic Rules Sending System */
forward rulestimer();
public 
rulestimer()
{
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == 0) return 1;
    new 
tmp[6];
    for (new 
0MAX_PLAYERSi++) {
        if (
IsPlayerConnected(i)) {
            
format(tmp6"rule%d"MRandom(bb)+1);
            
ReturnMessage(iCOLOR_YELLOW"Rule: {FF0000}%s."dini_Get(PlaceDirectory(rulesfolderrules), tmp), "");
        }
    }
    return 
1;
}
/*         Directory For Files     */
PlaceDirectory(directory[], filename[])
{
    new 
newname[128];
    
format(newnamesizeof(newname), "%s/%c/%s.ini"directoryfilename[0] != '.' filename[0] : '#'filename);
    return 
newname;
}
ReturnMessage(playeridcolorstr[], msg[], msg2[])
{
    new 
pstr[256];
    
format(pstr256strmsgmsg2);
    
SendClientMessage(playeridcolorpstr);
    return 
1;
}

ReturnAll(colorstr[], msg[], msg2[])
{
    new 
pstr[256];
    
format(pstr256strmsgmsg2);
    
SendClientMessageToAll(colorpstr);
    return 
1;
}
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Script by Bulletraja & Wherethescripts");
    print(
"--------------------------------------\n");
    
SetTimer("rulestimer"3000001);
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    new 
tmp2[256], tmp[256];
    if (
dialogid == DIALOG_RULE_DELETE)
    {
        if (
response)
        {
            
SetPVarInt(playerid"ruleselect"listitem+1);
            
format(tmp6"rule%d"listitem+1);
            if (!
dini_Isset(PlaceDirectory(rulesfolderrules), tmp))
                return 
SendClientMessage(playeridCOLOR_RED"Rule doesn't exist.");
            
format(tmp2sizeof(tmp2), "%s.\n\nDo you want to delete this rule?"dini_Get(PlaceDirectory(rulesfolderrules), tmp));
            
ShowPlayerDialog(playeridDIALOG_RULE_DELETE_CONFIRMDIALOG_STYLE_MSGBOX"Delete rule"tmp2"Delete""Cancel");
        }
        return 
1;
    }
    if (
dialogid == DIALOG_RULE_DELETE_CONFIRM)
    {
        if (
response)
        {
            
format(tmp6"rule%d"GetPVarInt(playerid"ruleselect"));
            if (!
dini_Isset(PlaceDirectory(rulesfolderrules), tmp))
                return 
SendClientMessage(playeridCOLOR_RED"Rule doesn't exist.");
            new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
            if (
GetPVarInt(playerid"ruleselect") != bb) {
                
format(tmp26"rule%d"bb);
                
dini_Set(PlaceDirectory(rulesfolderrules), tmpdini_Get(PlaceDirectory(rulesfolderrules), tmp2));
                
dini_Unset(PlaceDirectory(rulesfolderrules), tmp2);
            }
            else {
                
dini_Unset(PlaceDirectory(rulesfolderrules), tmp);
            }
            
dini_IntSet(PlaceDirectory(rulesfolderrules), "rules"bb-1);
            
SendClientMessage(playeridCOLOR_ORANGE"Rule deleted.");
        }
        else {
            new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
            new 
tmp3[2048];
            for (new 
1<= bbt++) {
                
format(tmp26"rule%d"t);
                
format(tmp2sizeof(tmp2), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp2));
                if (
strlen(tmp2) > 64) {
                    
strmid(tmp2tmp2061);
                    
format(tmp2sizeof(tmp2), "%s..."tmp2);
                }
                
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp2);
            }
            
ShowPlayerDialog(playeridDIALOG_RULE_DELETEDIALOG_STYLE_LIST"Rules"tmp3"Select""Cancel");
        }
        return 
1;
    }
    if (
dialogid == DIALOG_RULES)
    {
        if (
response)
        {
        }
        return 
1;
    }
    if (
dialogid == DIALOG_RULE_VIEW)
    {
        if (
response)
        {
            new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
            if (
bb == 0)
                return 
SendClientMessage(playeridCOLOR_RED"There are no rules created.");
            new 
tmp3[2048];
            for (new 
1<= bbt++) {
                
format(tmp26"rule%d"t);
                
format(tmp2sizeof(tmp2), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp2));
                if (
strlen(tmp2) > 64) {
                    
strmid(tmp2tmp2061);
                    
format(tmp2sizeof(tmp2), "%s..."tmp2);
                }
                
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp2);
            }
            
ShowPlayerDialog(playeridDIALOG_RULESDIALOG_STYLE_LIST"Rules"tmp3"Select""Cancel");
        }
        return 
1;
    }
    return 
1;
}

CMD:rules(playeridparams[])
{
    new 
tmp[256];
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == 0) return SendClientMessage(playeridCOLOR_RED"There are no rules created.");
    new 
tmp3[2048];
    for (new 
1<= bbt++)
    {
        
format(tmp6"rule%d"t);
        
format(tmpsizeof(tmp), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp));
        
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp);
    }
    
ShowPlayerDialog(playeridDIALOG_RULESDIALOG_STYLE_MSGBOX"Rules"tmp3"Accept""");
    return 
1;
}
CMD:addrule(playeridparams[])
{
    new 
tmp[256], tmp2[256], playername[25];

    if (
sscanf(params"s[128]"tmp)) return SendClientMessage(playeridCOLOR_WHITE"Usage: /addrule [rule]");
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == MAX_RULES)
    {
        
format(tmp2sizeof(tmp2), "Error: You have created the maximum of %d rules."MAX_RULES);
        
SendClientMessage(playeridCOLOR_REDtmp2);
        return 
1;
    }
    
dini_IntSet(PlaceDirectory(rulesfolderrules), "rules"bb+1);
    
format(tmp26"rule%d"bb+1);
    
dini_Set(PlaceDirectory(rulesfolderrules), tmp2tmp);
    
ReturnMessage(playeridCOLOR_ORANGE"Rule '%s' created."tmp"");
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    
ReturnAll(COLOR_YELLOW"%s has added a new rule. Type /rules to view the list of rules."playername"");
    return 
1;
}
CMD:delrule(playeridparams[])
{
    new 
tmp[256];
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == 0) return SendClientMessage(playeridCOLOR_RED"There are no rules created.");
    new 
tmp3[2048];
    for (new 
1<= bbt++)
    {
        
format(tmp6"rule%d"t);
        
format(tmpsizeof(tmp), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp));
        if (
strlen(tmp) > 64)
        {
            
strmid(tmptmp061);
            
format(tmpsizeof(tmp), "%s..."tmp);
        }
        
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp);
    }
    
ShowPlayerDialog(playeridDIALOG_RULE_DELETEDIALOG_STYLE_LIST"Rules"tmp3"Select""Cancel");
    return 
1;



Bugs: None [if you found please inform me]

i hope you will like the system

[FilterScript] BR Dynamic Rules System

$
0
0
Code:

//////////////////////    ///////////////////
  //                  //    //              //
  //                  //    //              //
  //                  //    //              //
  //                  //    //              //
  //                  //    //        //////
  /////////////////////      ////////////
  //                  //    //        //
  //                  //    //          //
  //                  //    //          //
  //                  //    //            //
  //                  //    //            //
  /////////////////////      //              //

Introduction: hey guys this script has been created by me by the way i would like to thanks to Wherethescripts for helping me in rulestimer.

Credits:
BulletRaja [Activated] [Whole Credits]
Wherethescripters [Merandom] [Timer helped]
Cyber_Punk [Merrandom Include]
Incognito [sscanf2]
Zeex [ZCMD]

Pictures: IMGUR












Downloads:
Click for merrandom include

CODE:
PHP Code:

/*
  //////////////////////     ///////////////////
  //                  //     //               //
  //                  //     //               //
  //                  //     //               //
  //                  //     //               //
  //                  //     //         //////
  /////////////////////      ////////////
  //                  //     //         //
  //                  //     //          //
  //                  //     //           //
  //                  //     //            //
  //                  //     //             //
  /////////////////////      //              //
  Bullet                      RAJA                  &          Wherethescripters
  cyber_punk: Merandom
  Zeex: ZCMD
  Incognito:  sscanf2
*/
//Merandom Download http://forum.sa-mp.com/showthread.php?t=109196
#define FILTERSCRIPT

#include <a_samp>
#include <sscanf2>
#include <Dini>
#include <zcmd>
#include <merrandom>
/* Dialogs */
#define    DIALOG_RULES                          1
#define DIALOG_RULE_DELETE                    2
#define DIALOG_RULE_DELETE_CONFIRM            3
#define DIALOG_RULE_VIEW                      4

/* Defines */
#define     MAX_RULES               10

/* folders & files */
#define rulesfolder "R"
#define rules       "rules"

/* COLORS */
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_RED 0xFF0000FF
#define COLOR_ORANGE 0xFF9900FF

/* Automatic Rules Sending System */
forward rulestimer();
public 
rulestimer()
{
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == 0) return 1;
    new 
tmp[6];
    for (new 
0MAX_PLAYERSi++) {
        if (
IsPlayerConnected(i)) {
            
format(tmp6"rule%d"MRandom(bb)+1);
            
ReturnMessage(iCOLOR_YELLOW"Rule: {FF0000}%s."dini_Get(PlaceDirectory(rulesfolderrules), tmp), "");
        }
    }
    return 
1;
}
/*         Directory For Files     */
PlaceDirectory(directory[], filename[])
{
    new 
newname[128];
    
format(newnamesizeof(newname), "%s/%c/%s.ini"directoryfilename[0] != '.' filename[0] : '#'filename);
    return 
newname;
}
ReturnMessage(playeridcolorstr[], msg[], msg2[])
{
    new 
pstr[256];
    
format(pstr256strmsgmsg2);
    
SendClientMessage(playeridcolorpstr);
    return 
1;
}

ReturnAll(colorstr[], msg[], msg2[])
{
    new 
pstr[256];
    
format(pstr256strmsgmsg2);
    
SendClientMessageToAll(colorpstr);
    return 
1;
}
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Script by Bulletraja & Wherethescripts");
    print(
"--------------------------------------\n");
    
SetTimer("rulestimer"3000001);
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    new 
tmp2[256], tmp[256];
    if (
dialogid == DIALOG_RULE_DELETE)
    {
        if (
response)
        {
            
SetPVarInt(playerid"ruleselect"listitem+1);
            
format(tmp6"rule%d"listitem+1);
            if (!
dini_Isset(PlaceDirectory(rulesfolderrules), tmp))
                return 
SendClientMessage(playeridCOLOR_RED"Rule doesn't exist.");
            
format(tmp2sizeof(tmp2), "%s.\n\nDo you want to delete this rule?"dini_Get(PlaceDirectory(rulesfolderrules), tmp));
            
ShowPlayerDialog(playeridDIALOG_RULE_DELETE_CONFIRMDIALOG_STYLE_MSGBOX"Delete rule"tmp2"Delete""Cancel");
        }
        return 
1;
    }
    if (
dialogid == DIALOG_RULE_DELETE_CONFIRM)
    {
        if (
response)
        {
            
format(tmp6"rule%d"GetPVarInt(playerid"ruleselect"));
            if (!
dini_Isset(PlaceDirectory(rulesfolderrules), tmp))
                return 
SendClientMessage(playeridCOLOR_RED"Rule doesn't exist.");
            new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
            if (
GetPVarInt(playerid"ruleselect") != bb) {
                
format(tmp26"rule%d"bb);
                
dini_Set(PlaceDirectory(rulesfolderrules), tmpdini_Get(PlaceDirectory(rulesfolderrules), tmp2));
                
dini_Unset(PlaceDirectory(rulesfolderrules), tmp2);
            }
            else {
                
dini_Unset(PlaceDirectory(rulesfolderrules), tmp);
            }
            
dini_IntSet(PlaceDirectory(rulesfolderrules), "rules"bb-1);
            
SendClientMessage(playeridCOLOR_ORANGE"Rule deleted.");
        }
        else {
            new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
            new 
tmp3[2048];
            for (new 
1<= bbt++) {
                
format(tmp26"rule%d"t);
                
format(tmp2sizeof(tmp2), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp2));
                if (
strlen(tmp2) > 64) {
                    
strmid(tmp2tmp2061);
                    
format(tmp2sizeof(tmp2), "%s..."tmp2);
                }
                
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp2);
            }
            
ShowPlayerDialog(playeridDIALOG_RULE_DELETEDIALOG_STYLE_LIST"Rules"tmp3"Select""Cancel");
        }
        return 
1;
    }
    if (
dialogid == DIALOG_RULES)
    {
        if (
response)
        {
        }
        return 
1;
    }
    if (
dialogid == DIALOG_RULE_VIEW)
    {
        if (
response)
        {
            new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
            if (
bb == 0)
                return 
SendClientMessage(playeridCOLOR_RED"There are no rules created.");
            new 
tmp3[2048];
            for (new 
1<= bbt++) {
                
format(tmp26"rule%d"t);
                
format(tmp2sizeof(tmp2), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp2));
                if (
strlen(tmp2) > 64) {
                    
strmid(tmp2tmp2061);
                    
format(tmp2sizeof(tmp2), "%s..."tmp2);
                }
                
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp2);
            }
            
ShowPlayerDialog(playeridDIALOG_RULESDIALOG_STYLE_LIST"Rules"tmp3"Select""Cancel");
        }
        return 
1;
    }
    return 
1;
}

CMD:rules(playeridparams[])
{
    new 
tmp[256];
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == 0) return SendClientMessage(playeridCOLOR_RED"There are no rules created.");
    new 
tmp3[2048];
    for (new 
1<= bbt++)
    {
        
format(tmp6"rule%d"t);
        
format(tmpsizeof(tmp), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp));
        
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp);
    }
    
ShowPlayerDialog(playeridDIALOG_RULESDIALOG_STYLE_MSGBOX"Rules"tmp3"Accept""");
    return 
1;
}
CMD:addrule(playeridparams[])
{
    new 
tmp[256], tmp2[256], playername[25];

    if (
sscanf(params"s[128]"tmp)) return SendClientMessage(playeridCOLOR_WHITE"Usage: /addrule [rule]");
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == MAX_RULES)
    {
        
format(tmp2sizeof(tmp2), "Error: You have created the maximum of %d rules."MAX_RULES);
        
SendClientMessage(playeridCOLOR_REDtmp2);
        return 
1;
    }
    
dini_IntSet(PlaceDirectory(rulesfolderrules), "rules"bb+1);
    
format(tmp26"rule%d"bb+1);
    
dini_Set(PlaceDirectory(rulesfolderrules), tmp2tmp);
    
ReturnMessage(playeridCOLOR_ORANGE"Rule '%s' created."tmp"");
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    
ReturnAll(COLOR_YELLOW"%s has added a new rule. Type /rules to view the list of rules."playername"");
    return 
1;
}
CMD:delrule(playeridparams[])
{
    new 
tmp[256];
    new 
bb dini_Int(PlaceDirectory(rulesfolderrules), "rules");
    if (
bb == 0) return SendClientMessage(playeridCOLOR_RED"There are no rules created.");
    new 
tmp3[2048];
    for (new 
1<= bbt++)
    {
        
format(tmp6"rule%d"t);
        
format(tmpsizeof(tmp), "%s"dini_Get(PlaceDirectory(rulesfolderrules), tmp));
        if (
strlen(tmp) > 64)
        {
            
strmid(tmptmp061);
            
format(tmpsizeof(tmp), "%s..."tmp);
        }
        
format(tmp3sizeof(tmp3), "%s%s\n"tmp3tmp);
    }
    
ShowPlayerDialog(playeridDIALOG_RULE_DELETEDIALOG_STYLE_LIST"Rules"tmp3"Select""Cancel");
    return 
1;



Bugs: None [if you found please inform me]

i hope you will like the system
rep+ if you like it

[FilterScript] Simple Math Quiz System

$
0
0
INTRO:
It's just a simple FilterScript which allow you to create math quiz....

COMMANDS:
/quiz,(rcon admin)
/qanswer.


LINKS:
Dini 1.6 : Dini 1.6 or Dini 2 : Dini 2
Sscanf : Sscanf
ZCMD : ZCMD
MerRandom : MerRandom

CODES:
PHP Code:

//Simple Math Quiz System by Usman
#include <a_samp>
#include <zcmd>
#include <sscanf>
#include <merrandom>

#define COLOR_DARKRED 0xAA3333FF
#define COLOR_GREY 0xAFAFAFFF
#define COLOR_BROWN 0x654321FF
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_RED 0xFF0000FF
#define COLOR_LRED 0xFF4747FF

new quizquizansquizpr;
new 
mtimer[MAX_PLAYERS];

public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Simple Math Quiz System by Usman");
    print(
"--------------------------------------\n");
    
    
SetTimer("timer_quiz"4000001);
    return 
1;
}

CMD:quiz(playeridparams[])
{
    
//Add your admin level here i am not using any thing!
    
SendClientMessage(playeridCOLOR_YELLOW"You have started the math quiz.");
    
quiz 0;
    
timer_quiz();
    return 
1;
}
CMD:qanswer(playerid,params[])
{
    new 
playername[25], ansstr[256];
    if(
quiz == 0) return SendClientMessage(playeridCOLOR_RED"Error: There is no math quiz right now or it might have been already solved.");
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    if (
mtimer[playerid] != 0) return SendClientMessage(playeridCOLOR_RED"Error: You are muted smart ass!");
    if(
sscanf(params,"d"ans)) return SendClientMessage(playeridCOLOR_WHITE"Usage: /qanswer [answer]");
    if(
ans != quizans) return SendClientMessage(playeridCOLOR_RED"Wrong answer better luck next time!");
     
format(strsizeof(str), "Well done {FF00FF}%s{FFFF00} you have answered an correct answer and won $%d."playernamequizpr);
     
SendClientMessage(playeridCOLOR_YELLOWstr);
    
GivePlayerMoney(playeridquizpr);
     
format(strsizeof(str), "[Math Quiz]{FFFFFF}: {FF00FF}%s{FFFFFF} have answered the quiz with %d and won $%d."playernameansquizpr);
    for (new 
0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i))
        {
         
SendClientMessage(iCOLOR_REDstr);
        }
    }
    
quiz 0;
    return 
1;
}

forward timer_quiz();
public 
timer_quiz()
{
    if(
quiz == 0)
    {
        new 
vv1v2v3mon;
        
random(50); v1 random(20); v2 random(30); v3 random(80);
        
quiz 1quizans v1 v2 v3;
        
mon random(10000)+5000;
        
quizpr mon;
        for (new 
0MAX_PLAYERSi++)
        {
            if (
IsPlayerConnected(i))
            {
                new 
str[256];
                
format(strsizeof(str), "[Math Quiz]{FFFFFF}: What is the answer of %dx%d-%d+%d ?? ({FF00FF}$%d{FFFFFF}) [/qanswer]."vv1v2v3mon);
                
SendClientMessage(iCOLOR_REDstr);
            }
        }
    }
    return 
1;



[FilterScript] Simple BR Bug Report System

$
0
0
Code:

/*
  //////////////////////    ///////////////////
  //                  //    //              //
  //                  //    //              //
  //                  //    //              //
  //                  //    //              //
  //                  //    //        //////
  /////////////////////      ////////////
  //                  //    //        //
  //                  //    //          //
  //                  //    //          //
  //                  //    //            //
  //                  //    //            //
  /////////////////////      //              //
  BULLET RAJA PRESENTS BUG REPORT SYSTEM
*/

Intro:

This is simple br bug report system
Commands:

/reportbug [players]
/checkbugs [rcon admin]

Credits:

A_SAMP: [Samp Developer]
SSCANF2: Click Here
ZCMD: Click Here
DINI: Click Here

Codes:

Click Here


Bugs:

hmm not found any if you found report me i am here to fix them

i hope you will like it

[FilterScript] Date & Time Textdraw [First Release]

$
0
0
[FS] Date & Time Textdraw - Real Time - +2GMT
This is my first filter-script it took me about 15 mintues. Here we go.
I hope you guys like it. its my first filter-script.

Shows day, month,year
Shows hour, mintues

Image: https://imgur.com/a/nM61N

Here is the code:
Code:

// Date & Time textdraw by Barnwell.
// Real Time - Date
// If you found any bug don't forget to reply on sa-mp forum.

#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT
new Text:DateText;
new Text:TimeText;

public OnFilterScriptInit()
{
    SetTimer("SetTimeDate",1000,true);
    DateText = TextDrawCreate(545.500000, 16.177732, "18/3/2016");
    TextDrawLetterSize(DateText, 0.298500, 1.058665);
    TextDrawAlignment(DateText, 1);
    TextDrawColor(DateText, -1);
    TextDrawSetShadow(DateText, 0);
    TextDrawSetOutline(DateText, 1);
    TextDrawBackgroundColor(DateText, 51);
    TextDrawFont(DateText, 2);
    TextDrawSetProportional(DateText, 1);

    TimeText = TextDrawCreate(556.000000, 28.622150, "19:49");
    TextDrawLetterSize(TimeText, 0.329499, 0.977777);
    TextDrawAlignment(TimeText, 1);
    TextDrawColor(TimeText, -1);
    TextDrawSetShadow(TimeText, 0);
    TextDrawSetOutline(TimeText, 1);
    TextDrawBackgroundColor(TimeText, 51);
    TextDrawFont(TimeText, 2);
    TextDrawSetProportional(TimeText, 1);

        print("\n--------------------------------------");
        print(" Date & Time Textdraw with functions by Barnwell");
        print("--------------------------------------\n");
        return 1;
}

public OnFilterScriptExit()
{
        return 1;
}

#else

#endif
public OnPlayerConnect(playerid)
{
        return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
        TextDrawHideForPlayer(playerid,DateText);
        TextDrawHideForPlayer(playerid,TimeText);
        return 1;
}
forward SetTimeDate();
public SetTimeDate()
{
        new string[128],
        // You can change the world time like GMT+2 GMT+3, etc
        year,month,day,hours,minutes,seconds;
    getdate(year, month, day), gettime(hours, minutes, seconds);
    SetWorldTime(hours+2);
    format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
    TextDrawSetString(DateText, string);
    format(string, sizeof string, "%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes);
    TextDrawSetString(TimeText, string);
}
public OnPlayerSpawn(playerid)
{
        TextDrawShowForPlayer(playerid,DateText);
        TextDrawShowForPlayer(playerid,TimeText);
        return 1;
}

[FilterScript] Filterscript Vehicle System

$
0
0
Notice : I really need the vehicle owner's script

Include : Y_ini, Streamer2, Forech and ZCMD

Link?

[FilterScript] AFK IN TEXTDRAW

[FilterScript] Dynamic BR Block Command System

$
0
0
Code:

/*
  BBBBBBBBBBBBBBBBB          RRRRRRRRRRRRRR
  BB              BB          RR          RR
  BB            BB          RR          RR
  BB            BB            RR        RR
  BB          BB            RR        RR
  BBBBBBBBBBBBB              RRRRRRRRRR
  BB          BB            RR        RR
  BB            BB            RR        RR
  BB            BB          RR          RR
  BB              BB          RR          RR
  BBBBBBBBBBBBBBBBB          RR            RR
  BULLET RAJA PRESENTS Dynamic BR Block Command System
*/

Intro:

This is simple Dynamic BR Block Command System, By this system you can block commands if the player will try to use that command he will get message Unknown Command.Enjoy & Rep If You Like It

Commands:

/blockcmd[rcon admin]
/unblockcmd[rcon admin]
/blockedcmds[rcon admin]

Credits:

A_SAMP: [Samp Developer]
SSCANF2: Click Here
ZCMD: Click Here
DINI: Click Here

Codes:

Click Here


Bugs:

Not found any if you found report it

i hope you will like it
Viewing all 595 articles
Browse latest View live


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