Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //created on 12/1/2013
- #include <a_samp>
- #include <sscanf2>
- #include <streamer>
- #include <foreach>
- #include <zcmd>
- #pragma tabsize 0 //you will get loose internation
- #define COLOR_BRIGHTRED 0xE60000FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_PURPLE 0x9900FFAA
- #define COLOR_BROWN 0x993300AA
- #define COLOR_ORANGE 0xFF9933AA
- #define COLOUR_PINK 0xFF00FFFF
- #define COLOUR_PURPLE 0x800080FF
- #define COLOUR_BLACK 0x000000FF
- #define COLOR_CYAN 0x99FFFFAA
- #define COLOR_TAN 0xFFFFCCAA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_KHAKI 0x999900AA
- #define COLOR_LIME 0x99FF00AA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_TURQ 0x00A3C0AA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_DARKRED 0xAA993333
- #define COLOR_VIOLET 0x9955DEEE
- #define NICE_BLUE 0xa0d3ffAA
- #define GREEN 0x21DD00FF
- #define RED 0xE60000FF
- #define ADMIN_RED 0xFB0000FF
- #define YELLOW 0xFFFF00FF
- #define ORANGE 0xF97804FF
- #define LIGHTRED 0xFF8080FF
- #define LIGHTBLUE 0x00C2ECFF
- #define PURPLE 0xB360FDFF
- #define PLAYER_COLOR 0xFFFFFFFF
- #define BLUE 0x1229FAFF
- #define LIGHTGREEN 0x38FF06FF
- #define DARKPINK 0xE100E1FF
- #define DARKGREEN 0x008040FF
- #define ANNOUNCEMENT 0x00CACAFB
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define NICESKY 0x99FFFFAA
- #define GRAY 0xCECECEFF
- #define red 0xE60000FF
- #define yellow 0xFFFF00FF
- #define COLOR_ANTIHAX 0xE60000FF
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_VIOLET 0x9955DEEE
- #define COLOR_LIGHTRED 0xFF99AADD
- #define COLOR_SEAGREEN 0x00EEADDF
- #define COLOR_GRAYWHITE 0xEEEEFFC4
- #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
- #define COLOR_GREENISHGOLD 0xCCFFDD56
- #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
- #define COLOR_NEUTRALBLUE 0xABCDEF01
- #define COLOR_LIGHTCYAN 0xAAFFCC33
- #define COLOR_LEMON 0xDDDD2357
- #define COLOR_MEDIUMBLUE 0x63AFF00A
- #define COLOR_NEUTRAL 0xABCDEF97
- #define COLOR_NEUTRALGREEN 0x81CFAB00
- #define COLOR_DARKGREEN 0x12900BBF
- #define COLOR_DARKBLUE 0x300FFAAB
- #define COLOR_BLUEGREEN 0x46BBAA00
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BROWN 0x993300AA
- #define COLOR_CYAN 0x99FFFFAA
- #define COLOR_TAN 0xFFFFCCAA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_KHAKI 0x999900AA
- #define COLOR_LIME 0x99FF00AA
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GILE 0x924161FF
- // ADDED 6-2-2012 Embed 0.3c
- #define COL_EASY "{FFF1AF}"
- #define COL_WHITE "{FFFFFF}"
- #define COL_BLACK "{0E0101}"
- #define COL_GREY "{C3C3C3}"
- #define COL_GREEN "{6EF83C}"
- #define COL_RED "{F81414}"
- #define COL_YELLOW "{F3FF02}"
- #define COL_ORANGE "{FFAF00}"
- #define COL_LIME "{B7FF00}"
- #define COL_CYAN "{00FFEE}"
- #define COL_LIGHTBLUE "{00C0FF}"
- #define COL_BLUE "{0049FF}"
- #define COL_MAGENTA "{F300FF}"
- #define COL_VIOLET "{B700FF}"
- #define COL_PINK "{FF00EA}"
- #define COL_MARONE "{A90202}"
- #define COL_CMD "{B8FF02}"
- #define COL_PARAM "{3FCD02}"
- #define COL_SERVER "{AFE7FF}"
- #define COL_VALUE "{A3E4FF}"
- #define COL_RULE "{F9E8B7}"
- #define COL_RULE2 "{FBDF89}"
- #define COL_RWHITE "{FFFFFF}"
- #define COL_LGREEN "{C9FFAB}"
- #define COL_LRED "{FFA1A1}"
- #define COL_LRED2 "{C77D87}"
- #define COLOR_FAHIM "{FF8000}"
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Moneybag System By Aryzal");
- print("--------------------------------------\n");
- return 1;
- }
- #if !defined isnull
- #define isnull(%1) \
- ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
- new eventcp ,
- eventcppickup ,
- Float:eventcpx,
- Float:eventcpy,
- Float:eventcpz ,
- eventcpdaset ,
- eventreward ,
- Text3D:eventmtext,
- eventstart ,
- eventformattext[128];
- CMD:createmb(playerid,params[])
- {
- if(IsPlayerAdmin(playerid)) // This will check if the player is admin. (The code [if] checks IF something is true.
- {
- new Float:x,Float:y,Float:z , f[128] ,amount;
- if(sscanf(params,"i",amount)) return SendClientMessage(playerid,-1,"stynx usage /createmb [price reward(number only)]");
- if(eventcpdaset == 1) return SendClientMessage(playerid,-1,"| You Have Created One ! |");
- else
- {
- GetPlayerPos(playerid,x,y,z);
- eventreward = amount;
- eventcpx = x;
- eventcpy = y;
- eventcpz = z;
- eventcpdaset = 1;
- format(f,sizeof(f),"you has set mb event cp at %d,%d,%d || reward : %d",x,y,z,amount);
- SendClientMessage(playerid,-1,f);
- }
- }
- else SendClientMessage(playerid, COLOR_RED, "ERROR:unknown command.. nice try use /help to see all commands"); // returning a err msg that he is not admin :L.
- return 1; // you must i said it
- }
- CMD:startmb(playerid,params[])
- {
- if(IsPlayerAdmin(playerid)) // This will check if the player is admin. (The code [if] checks IF something is true.
- {
- new f[128];
- if(isnull(params)) return SendClientMessage(playerid,-1,"stynx usage /startmb [name or words or clue or something nice xD]");
- if(eventcpdaset == 0) return SendClientMessage(playerid,-1,"You Must Use /createmb to do this");
- if(eventstart == 1)
- {
- format(f,128,"%s",eventformattext);
- SendClientMessageToAll(-1,f);
- }
- if(eventstart == 0)
- {
- eventcppickup = CreateDynamicPickup(1550,1,eventcpx, eventcpy, eventcpz,-1,-1,-1,100.0);
- eventcp = CreateDynamicCP(eventcpx, eventcpy, eventcpz,1,-1,-1,-1,1.0);
- eventmtext = CreateDynamic3DTextLabel("> Here Is Moneybag<", 0xFF8040FF, eventcpx, eventcpy, eventcpz,3.0);
- format(f,sizeof(f),"*** MoneyBagEvent(find the hidden moneybag) !!! at {C9FFAB}%s{FFFFFF} |reward : %d ***={FF8040}REAL",params,eventreward);
- eventformattext = f;
- eventstart = 1;
- SendClientMessageToAll(-1,f);
- }
- }
- else SendClientMessage(playerid, COLOR_RED, "ERROR:unknown command.. nice try use /help to see all commands "); // returning a err msg that he is not admin :L.
- return 1; // you must i said it
- }
- CMD:gotomb(playerid,params[])
- {
- if(IsPlayerAdmin(playerid)) // This will check if the player is admin. (The code [if] checks IF something is true.
- {
- SetPlayerPos(playerid,eventcpx, eventcpy+2, eventcpz);
- }
- else SendClientMessage(playerid, COLOR_RED, "ERROR:unknown command.. nice try use /help to see all commands "); // returning a err msg that he is not admin :L.
- return 1; // you must i said it
- }
- CMD:cancelmb(playerid,params[])
- {
- if(IsPlayerAdmin(playerid)) // This will check if the player is admin. (The code [if] checks IF something is true.
- {
- if(eventcpdaset == 1)
- {
- eventcpdaset = 0;
- eventstart = 0;
- DestroyDynamicPickup(eventcppickup);
- DestroyDynamicCP(eventcp);
- DestroyDynamic3DTextLabel(eventmtext);
- SendClientMessage(playerid,-1,"| kau da cancel event moneybags |");
- }
- else return SendClientMessage(playerid,-1,"you must create one moneybag to cancle it xD");
- }
- else SendClientMessage(playerid, COLOR_RED, "ERROR:unknown command.. nice try use /help to see all commands"); // returning a err msg that he is not admin :L.
- return 1; // you must i said it
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == eventcp && IsValidDynamicCP(eventcp) && eventcpdaset == 1)
- {
- new f[128];
- format(f,sizeof(f),"***%s has found the moneybag and won $%d (moneybag event over)***={FF8040}REAL ",GetName(playerid),eventreward);
- SendClientMessageToAll(-1,f);
- GivePlayerMoney(playerid,eventreward);
- eventcpdaset = 0;
- DestroyDynamicPickup(eventcppickup);
- DestroyDynamicCP(eventcp);
- DestroyDynamic3DTextLabel(eventmtext);
- eventstart = 0;
- PlaySoundForAll(36205 , 0.0, 0.0, 0.0);
- return 1;
- }
- return 1;
- }
- PlaySoundForAll(soundid, Float:x, Float:y, Float:z)
- {
- foreach(new i : Player)
- {
- if (IsPlayerConnected(i))
- {
- PlayerPlaySound(i, soundid, x, y, z);
- }
- }
- }
- stock GetName(playerid)
- {
- new
- name[24];
- GetPlayerName(playerid, name, sizeof(name));
- //strreplace(name, '_', ' ';
- return name;
- }
- #endif
Add Comment
Please, Sign In to add comment