[FilterScript] [FS] Anti Driveby while Driver
#1

Remove please.
Reply
#2

How about in other people's screen?
Reply
#3

What you mean in the other peoples screen?
What's more to explain? It doesn't let you shoot while driver! which most RP servers have as a rule(for some unknown reason)
so for them this would bee great!!
Reply
#4

Quote:
Originally Posted by ShadowMcFartPants!
What you mean in the other peoples screen?
What's more to explain? It doesn't let you shoot while driver! which most RP servers have as a rule(for some unknown reason)
so for them this would bee great!!
exactly, and thanks!
Reply
#5

you can arrange a pastebinlink?
Reply
#6

no need for pastebin, infact i duno why he didn't do this anyway


Код:
forward AntiDB(playerid);

public OnFilterScriptInit()
{
	print("- Anti Driveby -");
	print("- LOADED -");
	SetTimer("AntiDB",100,true);
	return 1;
}

public AntiDB(playerid)
{
	if (GetPlayerWeapon(playerid) == 28 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	if (GetPlayerWeapon(playerid) == 29 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	if (GetPlayerWeapon(playerid) == 32 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	return 1;
}
Reply
#7

There are alot of more efficient ways to do it than a 100ms timer
Reply
#8

well there is another way is if you got a drivebyable gun and you enter the car it will kick you out and say you cannot drive with this weapon but this system is just basicly blocks drive bying
Reply
#9

Код:
public AntiDB(playerid)
{
	if (GetPlayerWeapon(playerid) == 28 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	if (GetPlayerWeapon(playerid) == 29 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	if (GetPlayerWeapon(playerid) == 32 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	return 1;
}
Bad.
Код:
public AntiDB(playerid)
{
	if ((GetPlayerWeapon(playerid) == 28 || GetPlayerWeapon(playerid) == 29 || GetPlayerWeapon(playerid) == 32) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	return 1;
}
Good.
Reply
#10

Quote:
Originally Posted by n_i_k_i
Код:
public AntiDB(playerid)
{
	if (GetPlayerWeapon(playerid) == 28 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	if (GetPlayerWeapon(playerid) == 29 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	if (GetPlayerWeapon(playerid) == 32 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	return 1;
}
Bad.
Код:
public AntiDB(playerid)
{
	if ((GetPlayerWeapon(playerid) == 28 || GetPlayerWeapon(playerid) == 29 || GetPlayerWeapon(playerid) == 32) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
	}
	return 1;
}
Good.
dude it still functions perfectly so you dont need to be writing this
PS: added to many ( )
Reply
#11

public OnPlayerStateChange(playerid, newstate, oldstate) if(newstate == PLAYER_STATE_DRIVER) ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);

my short version
Reply
#12

Quote:
Originally Posted by [JIeXa
]
public OnPlayerStateChange(playerid, newstate, oldstate) if(newstate == PLAYER_STATE_DRIVER) ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);

my short version
but that would do it no matter what, this just dose it when ever you have a mp5,uzi,tec9 in hand
Reply
#13

version short
very short !
Reply
#14

This looks kind stupid while you are on Bike
Reply
#15

Seif has it already, in Seif's script it just disarms the player while he enters the car, saves the ammo + weapon.

When he exits his car, it gives him back..
Reply
#16

I re-scripted your script a bit, I haven't tested it yet but it has to work fine .

Link: http://pawn.pastebin.com/f68f554ed

Have fun.
Reply
#17

Quote:
Originally Posted by g4ngsta
I re-scripted your script a bit, I haven't tested it yet but it has to work fine .

Link: http://pawn.pastebin.com/f68f554ed

Have fun.
I think you need permissions to do it..
Reply
#18

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by g4ngsta
I re-scripted your script a bit, I haven't tested it yet but it has to work fine .

Link: http://pawn.pastebin.com/f68f554ed

Have fun.
I think you need permissions to do it..
screw permissions, his script was so incredibly inefficient it NEEDED it ¬_¬
Reply
#19

Quote:
Originally Posted by Jolteon | RD Left
Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by g4ngsta
I re-scripted your script a bit, I haven't tested it yet but it has to work fine .

Link: http://pawn.pastebin.com/f68f554ed

Have fun.
I think you need permissions to do it..
screw permissions, his script was so incredibly inefficient it NEEDED it ¬_¬
Owned, lol.
Reply
#20

omai, Why are you guys so mean? What's the point? Give advise show him how to make it better, w/e don't just rip him how would you like it if you scripted something preety useful and someone just ripped the shit out of it ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)