SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 07/07/2012, 09:03 AM   #1
gangsterm
Little Clucker
 
Join Date: Apr 2009
Posts: 24
Reputation: 6
Default Gun Seller [Good for RP servers]

Hello and Welcome to one of my filterscripts.
I dont use this one anymore so you all can have it. I will trade it for some rep points.

Enjoy yourself

Greeting Malik AKA New York City Roleplay

//#define FILTERSCRIPT

forward Float:GetDistanceBetweenPlayers(p1,p2);
#include <a_samp> // Default Samp Include
#include <dutils> // Dutlis Addon Include
#include <dudb> // Dudb Addon Include
#include <float> // Default Float Include
#define GREY 0xAFAFAFAA
#define GREEN 0x33AA33AA
#define YELLOW 0xFFFF00AA
#define WHITE 0xFFFFFFAA
#define LIGHTBLUE 0x33CCFFAA
#define ORANGE 0xFF9900AA
#define RED 0xAA3333AA
#define COLOR_RED1 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_CYAN 0x00BFF3AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_LIGHTGREEN 0x5BC476FF
#define COLOR_PINK1 0xFFA6FFFF
#if defined FILTERSCRIPT


#endif
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" All credits go to malik server ip 82.169.88.57:7777");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
new sendername[MAX_PLAYER_NAME];
new string [256];
new tmp[256];
new giveplayer[MAX_PLAYER_NAME];

if (strcmp("/gdfac", cmdtext, true) == 0)
{
SetPlayerPos(playerid, 2151.0154, -2265.7639, 13.3060);
SendClientMessage(playerid, 0x33AA33AA, "Welcome to the Gun Dealer Factory!");
SetPlayerInterior(playerid,0);
return 1;
}

if (strcmp("/grovestreet", cmdtext, true) == 0)
{
SetPlayerPos(playerid, 2491.1365,-1685.7610,13.5106);
SendClientMessage(playerid, 0x00BFF3AA, "Welcome to Grovestreet!");
SetPlayerInterior(playerid,0);
return 1;
}

if (strcmp("/gdhq", cmdtext, true) == 0)
{
SetPlayerPos(playerid, 2151.068, -1867.854, 13.114);
SendClientMessage(playerid, 0x00BFF3AA, "Welcome to the gun dealer factory!");
SetPlayerInterior(playerid,0);
return 1;
}

if (strcmp("/varios", cmdtext, true) == 0)
{
SetPlayerPos(playerid, 1883.994, -2015.324, 13.110);
SendClientMessage(playerid, 0x00BFF3AA, "Welcome to the Surside Surenos Hood!");
SetPlayerInterior(playerid,0);
return 1;
}


if(strcmp(cmd, "/selldeagle", true) == 0 || strcmp(cmd, "/givedeagle", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Correct Usage: /selldeagle [playerid] [ammo]"); return 1;
}
new playa;
new otherplayer = strval(tmp);
playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!IsPlayerConnected(playa)) return SendClientMessage(playerid, WHITE, "SERVER MESSAGE: Incorrect ID.");
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (GetDistanceBetweenPlayers(playerid,playa) > 2.00)
{
SendClientMessage(playerid,COLOR_RED1,"You are too far away!!");
return 1;
}


new ammo = strval(tmp);
if (ammo < 1 || ammo > 500) return SendClientMessage(playerid,RED," * The ammo limits are 1-500 for a Guns!");
GivePlayerWeapon(playa,24,ammo);
new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME];
GetPlayerName(otherplayer,pname,sizeof(pname));
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s has passed you a Deagle with (Ammo: %d).", pname2,ammo);
SendClientMessage(otherplayer,COLOR_RED1,string);
format(string,sizeof(string),"You passed a Deagle with (Ammo: %d) to %s.", ammo, pname);
SendClientMessage(playerid,COLOR_RED1,string);
return 1;
}

if(strcmp(cmd, "/selluzi", true) == 0 || strcmp(cmd, "/giveuzi", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Correct Usage: /selluzi [playerid] [ammo]"); return 1; }
new playa;
new otherplayer = strval(tmp);
playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!IsPlayerConnected(playa)) return SendClientMessage(playerid, WHITE, "SERVER MESSAGE: Incorrect ID.");
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (GetDistanceBetweenPlayers(playerid,playa) > 2.00)
{
SendClientMessage(playerid,COLOR_RED1,"You are too far away!!");
return 1;
}
else if(otherplayer == playerid)
{
SendClientMessage(playerid, RED, "You can't sell yourself!");
return 1;
}
new ammo = strval(tmp);
if (ammo < 1 || ammo > 500) return SendClientMessage(playerid,RED," * The ammo limits are 1-500 for a Guns!");
GivePlayerWeapon(playa,28,ammo);
new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME];
GetPlayerName(otherplayer,pname,sizeof(pname));
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s has passed you an Uzi with (Ammo: %d).", pname2,ammo);
SendClientMessage(otherplayer,COLOR_RED1,string);
format(string,sizeof(string),"You passed a Uzi with (Ammo: %d) to %s.", ammo, pname);
SendClientMessage(playerid,COLOR_RED1,string);
return 1;
}

if(strcmp(cmd, "/selltec9", true) == 0 || strcmp(cmd, "/givetec9", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Correct Usage: /selltec9 [playerid] [ammo]"); return 1; }
new playa;
new otherplayer = strval(tmp);
playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!IsPlayerConnected(playa)) return SendClientMessage(playerid, WHITE, "SERVER MESSAGE: Incorrect ID.");
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (GetDistanceBetweenPlayers(playerid,playa) > 2.00)
{
SendClientMessage(playerid,COLOR_RED1,"You are too far away!!");
return 1;
}
else if(otherplayer == playerid)
{
SendClientMessage(playerid, RED, "You can't sell yourself!");
return 1;
}
new ammo = strval(tmp);
if (ammo < 1 || ammo > 500) return SendClientMessage(playerid,RED," * The ammo limits are 1-500 for a Guns!");
GivePlayerWeapon(playa,32,ammo);
new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME];
GetPlayerName(otherplayer,pname,sizeof(pname));
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s has passed you a tec9 with (Ammo: %d).", pname2,ammo);
SendClientMessage(otherplayer,COLOR_RED1,string);
format(string,sizeof(string),"You passed a tec9 with (Ammo: %d) to %s.", ammo, pname);
SendClientMessage(playerid,COLOR_RED1,string);
return 1;
}

if(strcmp(cmd, "/sellak47", true) == 0 || strcmp(cmd, "/giveak47", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Correct Usage: /sellak47 [playerid] [ammo]"); return 1; }
new playa;
new otherplayer = strval(tmp);
playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!IsPlayerConnected(playa)) return SendClientMessage(playerid, WHITE, "SERVER MESSAGE: Incorrect ID.");
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (GetDistanceBetweenPlayers(playerid,playa) > 2.00)
{
SendClientMessage(playerid,COLOR_RED1,"You are too far away!!");
return 1;
}

new ammo = strval(tmp);
if (ammo < 1 || ammo > 500) return SendClientMessage(playerid,RED," * The ammo limits are 1-500 for a Guns!");
GivePlayerWeapon(playa,30,ammo);
new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME];
GetPlayerName(otherplayer,pname,sizeof(pname));
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s has passed you an ak47 with (Ammo: %d).", pname2,ammo);
SendClientMessage(otherplayer,COLOR_RED1,string);
format(string,sizeof(string),"You passed an ak47 with (Ammo: %d) to %s.", ammo, pname);
SendClientMessage(playerid,COLOR_RED1,string);
return 1;
}

if(strcmp(cmd, "/sellm4", true) == 0 || strcmp(cmd, "/givem4", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Correct Usage: /sellm4 [playerid] [ammo]"); return 1; }
new playa;
new otherplayer = strval(tmp);
playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!IsPlayerConnected(playa)) return SendClientMessage(playerid, WHITE, "SERVER MESSAGE: Incorrect ID.");
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (GetDistanceBetweenPlayers(playerid,playa) > 2.00)
{
SendClientMessage(playerid,COLOR_RED1,"You are too far away!!");
return 1;


}
new ammo = strval(tmp);
if (ammo < 1 || ammo > 500) return SendClientMessage(playerid,RED," * The ammo limits are 1-500 for a Guns!");
GivePlayerWeapon(playa,31,ammo);
new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME];
GetPlayerName(otherplayer,pname,sizeof(pname));
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s has passed you a m4 with (Ammo: %d).", pname2,ammo);
SendClientMessage(otherplayer,COLOR_RED1,string);
format(string,sizeof(string),"You passed a m4 with (Ammo: %d) to %s.", ammo, pname);
SendClientMessage(playerid,COLOR_RED1,string);
return 1;
}

if(strcmp(cmd, "/sellshotgun", true) == 0 || strcmp(cmd, "/giveshotgun", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Correct Usage: /sellshotgun [playerid] [ammo]"); return 1; }
new playa;
new otherplayer = strval(tmp);
playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!IsPlayerConnected(playa)) return SendClientMessage(playerid, WHITE, "SERVER MESSAGE: Incorrect ID.");
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (GetDistanceBetweenPlayers(playerid,playa) > 2.00)
{
SendClientMessage(playerid,COLOR_RED1,"You are too far away!!");
return 1;

}
new ammo = strval(tmp);
if (ammo < 1 || ammo > 20) return SendClientMessage(playerid,RED," * The ammo limits are 1-20 for a shotGuns!");
GivePlayerWeapon(playa,25,ammo);
new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME];
GetPlayerName(otherplayer,pname,sizeof(pname));
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s has passed you a shotgun with (Ammo: %d).", pname2,ammo);
SendClientMessage(otherplayer,COLOR_RED1,string);
format(string,sizeof(string),"You passed a shotgun with (Ammo: %d) to %s.", ammo, pname);
SendClientMessage(playerid,COLOR_RED1,string);
return 1;
}
return 0;
}






















public Float:GetDistanceBetweenPlayers(p1,p2)
{
new Float1,Float:y1,Float:z1,Float2,Float:y2,Float :z2;
if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){
return -1.00;
}
GetPlayerPos(p1,x1,y1,z1);
GetPlayerPos(p2,x2,y2,z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2 )+floatpower(floatabs(floatsub(y2,y1)),2)+floatpow er(floatabs(floatsub(z2,z1)),2));
}
gangsterm is offline   Reply With Quote
Old 07/07/2012, 09:07 AM   #2
Isaac Mofujohn
Big Clucker
 
Isaac Mofujohn's Avatar
 
Join Date: Sep 2011
Location: California, USA
Posts: 58
Reputation: 4
Default Re: Gun Seller [Good for RP servers]

seems like some a job for roleplay ok, and hey can u add screenshots? (location etc)
__________________
----------------------------------------------------------
My filterscripts.
----------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------
Isaac Mofujohn is offline   Reply With Quote
Old 07/07/2012, 11:35 AM   #3
shayan122
Banned
 
Join Date: May 2011
Location: Iran
Posts: 201
Reputation: 16
Default Re: Gun Seller [Good for RP servers]

nice
better to edit post and use or paste here: www.pastebin.com!

any screens videos?
shayan122 is offline   Reply With Quote
Old 07/07/2012, 01:56 PM   #4
sherlock
High-roller
 
sherlock's Avatar
 
Join Date: Aug 2010
Location: United Kingdom
Posts: 1,045
Reputation: 60
Default Re: Gun Seller [Good for RP servers]

There is this really great tool called pastebin. It means you do not have to clog up your post with the whole script!
__________________


sherlock is offline   Reply With Quote
Old 07/07/2012, 03:19 PM   #5
coole210
High-roller
 
Join Date: Jul 2008
Location: Canada
Posts: 1,033
Reputation: 84
Default Re: Gun Seller [Good for RP servers]

Just like everyone else said, use pastebin for your scripts. This is also not a server advertisement section.
coole210 is offline   Reply With Quote
Old 07/07/2012, 03:22 PM   #6
miikeyy45
Big Clucker
 
miikeyy45's Avatar
 
Join Date: Dec 2010
Posts: 54
Reputation: 9
Default Re: Gun Seller [Good for RP servers]

Man, use pastebim, its just a waste of space for your damn post.
__________________
miikeyy45 is offline   Reply With Quote
Old 08/07/2012, 01:44 PM   #7
gangsterm
Little Clucker
 
Join Date: Apr 2009
Posts: 24
Reputation: 6
Default Re: Gun Seller [Good for RP servers]

chill
gangsterm is offline   Reply With Quote
Old 08/07/2012, 02:33 PM   #8
Inverse
Huge Clucker
 
Inverse's Avatar
 
Join Date: Jun 2011
Location: Braavos
Posts: 283
Reputation: 18
Default Re: Gun Seller [Good for RP servers]

Please post some screenshots. And next time, pleae upload your script somewhere or just use pastebin.
__________________
[FS] xPlosions - NEW!

Inverse is offline   Reply With Quote
Old 07/04/2013, 12:23 PM   #9
RoW001
Little Clucker
 
Join Date: Jul 2012
Posts: 26
Reputation: 4
Default Re: Gun Seller [Good for RP servers]

hello gay exist (pawn)xD
RoW001 is offline   Reply With Quote
Old 07/04/2013, 01:24 PM   #10
dakata994
Huge Clucker
 
dakata994's Avatar
 
Join Date: Sep 2012
Location: Bulgaria, Dobrich
Posts: 302
Reputation: 18
Default Re: Gun Seller [Good for RP servers]

Quote:
Originally Posted by RoW001 View Post
hello gay exist (pawn)xD
Lol,why did you Insult he?
He maybe is new ?? or didn't know ?
dakata994 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone know any good RP servers? John_Cooper Everything and Nothing 31 14/04/2012 10:02 AM
Good and cheap vps seller? iTorran Everything and Nothing 2 25/08/2010 02:55 PM


All times are GMT. The time now is 08:35 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.