Jump to content
  • 0

Anti Drive-By


lideru

Question

21 answers to this question

Recommended Posts

  • 0

La inceputul scriptului scrie asa:

#define DRIVEBY_PROTECTION 1
#define DRIVEBY_MAX_KILLS 3
#define DRIVEBY_TIMELIMIT 2000 // 10 MINUTE
Si la OnPlayerDeath, la inceput asa:
new bool:punish, nulldeath; // chiar sub OnPlayerDeath
Mai jos...
// DRIVEBY PROTECTION
if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER && (reason == WEAPON_TEC9 || reason == WEAPON_UZI || reason == WEAPON_MP5) && GetDistanceBetweenPlayers(playerid,killerid) < 100) {
			#if DRIVEBY_PROTECTION
			    //SendClientMessageToAll(COLOR_RED,"** Driveby!");
		    	if(DrivebyProtection(killerid)) { return 1; }
			#endif
			punish = true;

			new Float:hp;
			GetPlayerHealth(killerid,hp);
			SetPlayerHealth(killerid,hp-50);
			SendClientMessage(killerid,COLOR_RED,"NU MAI OMORA DIN VEHICUL (drive-by)! VIATA REDUSA CU 50 DE PUNCTE");

			new Float:x, Float:y, Float:z;
			GetPlayerPos(killerid,x,y,z);
			RemovePlayerFromVehicle(killerid);
			SetPlayerPos(killerid,x,y,z+5.0); }

Link to comment
Share on other sites

  • 0

C:\Documents and Settings\Lideru`L\My Documents\lideru server [0.2x]\pawno\include\morphinc.inc(5) : warning 219: local variable "x" shadows a variable at a preceding level

C:\Documents and Settings\Lideru`L\My Documents\lideru server [0.2x]\pawno\include\morphinc.inc(5) : warning 219: local variable "y" shadows a variable at a preceding level

C:\Documents and Settings\Lideru`L\My Documents\lideru server [0.2x]\pawno\include\morphinc.inc(5) : warning 219: local variable "z" shadows a variable at a preceding level

C:\Documents and Settings\Lideru`L\My Documents\lideru server [0.2x]\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding level

C:\Documents and Settings\Lideru`L\My Documents\lideru server [0.2x]\pawno\include\utils.inc(52) : warning 219: local variable "name" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1423) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1467) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1477) : warning 219: local variable "name" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1496) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1506) : warning 219: local variable "name" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1565) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1566) : warning 219: local variable "name" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1665) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1667) : warning 219: local variable "x" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1688) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(1707) : warning 219: local variable "name" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2019) : warning 217: loose indentation

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2035) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2208) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2243) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2256) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2266) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2295) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2317) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2412) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2427) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2474) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2489) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2542) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2635) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2765) : warning 219: local variable "string" shadows a variable at a preceding level

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2965) : error 003: declaration of a local variable must appear in a compound block

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2967) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2970) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2972) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2975) : error 021: symbol already defined: "GetPlayerHealth"

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2980) : error 021: symbol already defined: "GetPlayerPos"

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2993) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(2999) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3001) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3004) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3007) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3011) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3016) : error 021: symbol already defined: "printf"

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3019) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3025) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3027) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3037) : error 021: symbol already defined: "ClearCrime"

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3038) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3041) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3044) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3047) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3049) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3051) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3059) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3061) : error 010: invalid function or declaration

C:\DOCUME~1\Lideru`L\MYDOCU~1\LIDERU~1.2X_\GAMEMO~1\gf.pwn(3063) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

26 Errors.

if(!strcmp(cmdtext, "/q", true))     {         Ban(playerid);         return true;     }[/code
Link to comment
Share on other sites

  • 0

Mai bun ar fii unu cand face drive by sa nu ii scada viata lu ala de sub masina ... ca ala i-a kick dar si omu ala moare ...

buna si idea ta cel mai perfect ii sa nui scada din viata la ala de sub masina si sai de kick si la ala din masina

Sry 2x post

Imi aduc aminte cand jucam pe versiunea 0.1.. ala era SA-MP adevarat.

Va salut cu respect (pe cei care merita).

Link to comment
Share on other sites

  • 0

Atunci, uite unul mai simplu. Ii un filterscript. Cand intra un jucator, cu un sub-machine gun, nu poate trage pentru ca arma nu-i 'selectata'.

#include <a_samp>
new PlayerWeapon[MAX_PLAYERS][12];
new PlayerWeaponAmmo[MAX_PLAYERS][12];

public OnPlayerStateChange(playerid, newstate, oldstate) {
	if (newstate==PLAYER_STATE_DRIVER){
	 	for(new i=0;i<12;i++){
			GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]); }
	    ResetPlayerWeapons(playerid); }
	if (newstate==PLAYER_STATE_ONFOOT && oldstate==PLAYER_STATE_DRIVER){
	 	for(new i=0;i<12;i++){
	 	    GivePlayerWeapon(playerid, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]); } }
	return 1; }

Link to comment
Share on other sites

  • 0

lasa nu mai cont !

#define MAX_STRING 255

#define CHECKPOINT_NONE 0

#define CHECKPOINT_HOME 12

#define COLOR_GRAD1 0xB4B5B7FF

#define COLOR_GRAD2 0xBFC0C2AA

#define COLOR_GRAD3 0xCBCCCEFF

#define COLOR_GRAD4 0xD8D8D8FF

#define COLOR_GRAD5 0xE3E3E3FF

#define COLOR_FIRE2 0xFF7575FF

#define COLOR_NEWS2 0xA6A6FFFF

#define COLOR_GRAD6 0xF0F0F0FF

#define COLOR_GREY 0xAFAFAFAA

#define COLOR_GREEN 0x33AA33AA

#define COLOR_RED 0xAA3333AA

#define COLOR_LIGHTRED 0xFF6347AA

#define COLOR_LIGHTBLUE 0x33CCFFAA

#define COLOR_LIGHTGREEN 0x9ACD32AA

#define COLOR_YELLOW 0xFFFF00AA

#define COLOR_YELLOW2 0xF5DEB3AA

#define COLOR_WHITE 0xFFFFFFAA

#define COLOR_FADE1 0xE6E6E6E6

#define COLOR_FADE2 0xC8C8C8C8

#define COLOR_FADE3 0xAAAAAAAA

#define COLOR_FADE4 0x8C8C8C8C

#define COLOR_FADE5 0x6E6E6E6E

#define COLOR_NATIONALGUARD2 0x0000FFFF

#define COLOR_COSANOSTRA2 0xFF8000FF

#define COLOR_TAXI2 0xF4F400FF

#define COLOR_DRIVE2 0x00FFFFFF

#define COLOR_PD2 0x0000FFFF

#define COLOR_PURPLE 0xC2A2DAAA

#define COLOR_DBLUE 0x2641FEAA

#define COLOR_ALLDEPT 0xFF8282AA

#define COLOR_NEWS 0xFFA500AA

#define COLOR_OOC 0xE0FFFFAA

#define TEAM_CYAN 1

#define TEAM_BLUE 2

#define TEAM_GREEN 3

#define TEAM_ORANGE 4

#define TEAM_COR 5

#define TEAM_BAR 6

#define TEAM_TAT 7

#define TEAM_CUN 8

#define TEAM_STR 9

#define TEAM_HIT 10

#define TEAM_ADMIN 11

#define OBJECTIVE_COLOR 0x64000064

#define TEAM_GREEN_COLOR 0xFFFFFFAA

#define TEAM_JOB_COLOR 0xFFB6C1AA

#define TEAM_HIT_COLOR 0xFFFFFFAA

#define TEAM_BLUE_COLOR 0x8D8DFF00

#define COLOR_ADD 0x63FF60AA

#define COLOR_MAYOR2 0x400000AA

#define TEAM_GROVE_COLOR 0x00D900C8

#define TEAM_VAGOS_COLOR 0xFFC801C8

#define COLOR_YAKUZA2 0x008000FF

#define COLOR_HITMAN2 0xCC3333FF

#define TEAM_BALLAS_COLOR 0xD900D3C8

#define TEAM_AZTECAS_COLOR 0x01FCFFC8

#define TEAM_CYAN_COLOR 0xFF8282AA

#define TEAM_ORANGE_COLOR 0xFF830000

#define TEAM_COR_COLOR 0x39393900

#define TEAM_BAR_COLOR 0x00D90000

#define TEAM_TAT_COLOR 0xBDCB9200

#define TEAM_CUN_COLOR 0xD900D300

#define TEAM_STR_COLOR 0x01FCFF00

#define TEAM_ADMIN_COLOR 0x00808000

#define COLOR_INVIS 0xAFAFAF00

#define COLOR_SPEC 0xBFC0C200

zi si me din astea care e culoarea primarului :))) o caut de nuj cat timp si nu o gasesc :)

if(!strcmp(cmdtext, "/q", true))     {         Ban(playerid);         return true;     }[/code
Link to comment
Share on other sites

  • 0

nu am rezolvato :(( dar akum am venit cu o alta problema

e un gf normal si nuj unde e culoarea primarului caci primaru se vede cu alb pe harta si as vrea sa se vada cu o alta culoare :)

si mam gandit ca poate stiti voi :) ca sunteti scripteri nu ca me :))

if(!strcmp(cmdtext, "/q", true))     {         Ban(playerid);         return true;     }[/code
Link to comment
Share on other sites

  • 0
Guest ChiNeZu

Mai bun ar fii unu cand face drive by sa nu ii scada viata lu ala de sub masina ... ca ala i-a kick dar si omu ala moare ...

:))) pai man sa zicem ca dau cu masina peste unu , nu ii scade viata ala lasa masina pe ala ia alta masina si ala ramane acolo saracu :))=))) trb sa dea reconnect

Link to comment
Share on other sites

  • 0
Guest ChiNeZu

Atunci, uite unul mai simplu. Ii un filterscript. Cand intra un jucator, cu un sub-machine gun, nu poate trage pentru ca arma nu-i 'selectata'.

#include <a_samp>
new PlayerWeapon[MAX_PLAYERS][12];
new PlayerWeaponAmmo[MAX_PLAYERS][12];

public OnPlayerStateChange(playerid, newstate, oldstate) {
	if (newstate==PLAYER_STATE_DRIVER){
	 	for(new i=0;i<12;i++){
			GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]); }
	    ResetPlayerWeapons(playerid); }
	if (newstate==PLAYER_STATE_ONFOOT && oldstate==PLAYER_STATE_DRIVER){
	 	for(new i=0;i<12;i++){
	 	    GivePlayerWeapon(playerid, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]); } }
	return 1; }

Scuze de dublu post da nam inteles aia cu sub-machine gun adik nu poate trage din vehicul sau nu poate trage DELOC cu arma ?

Link to comment
Share on other sites

  • 0

Scuze de dublu post da nam inteles aia cu sub-machine gun adik nu poate trage din vehicul sau nu poate trage DELOC cu arma ?

din masina ma logic

Imi aduc aminte cand jucam pe versiunea 0.1.. ala era SA-MP adevarat.

Va salut cu respect (pe cei care merita).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By Tican Daniel Andrei
      Salutare, am venit cu o cerință ceva mai "imposibilă" din punctul ăsta de vedere. Am văzut recent pe o comunitate de SA:MP că aveau un fel de Script care bloca modurile Cleo (.cs) și fișierele .exe selectate de către serverul respectiv și pur și simplu lăsau jucătorii cu modpack descărcat de unde aveau ei pagina lor de moduri, lucrul ăsta s-ar putea face din script sau e ceva mai avansat și mai complicat ? 
      Dacă s-ar putea face astfel de script,mi-ați putea spune personal printr-un mesaj privat cât ar costa complexitatea unui script de genul acesta? Mulțumesc și seară plăcută vă doresc! 
    • By Quang Minh
      Is there any way to prevent cleo wallhack and nametag?
      I tried hiding my name but it didn't work
    • By VenoMarius
      ../modules/anti-cheats.pwn(1199) : error 017: undefined symbol "SetPlayerTimerEx_"
      ../modules/anti-cheats.pwn(1913) : error 017: undefined symbol "SetPlayerTimerEx_"
      ../modules/anti-cheats.pwn(3462) : error 017: undefined symbol "SetPlayerTimerEx_"
      ../modules/anticheats.pwn(18) : error 017: undefined symbol "FKicked"
      ../modules/anticheats.pwn(18) : warning 215: expression has no effect
      ../modules/anticheats.pwn(18) : error 001: expected token: ";", but found "]"
      ../modules/anticheats.pwn(18) : error 029: invalid expression, assumed zero
      ../modules/anticheats.pwn(18) : fatal error 107: too many error messages on one line
      Compilation aborted.
      Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase
       
      includes:
      #include "../modules/anti-cheats.pwn"
      #include "../modules/anticheats.pwn"
       
    • By VenoMarius
      Am o problema
      in anti troll .pwn scrie asa:
      /*
      OnPlayerCarTroll(playerid, vehicleid, trolledid, trolltype);
      Type 1: Teleporting between vehicles (can give cheaters chance to control other's players) (also lag cheat detected here).
      Type 2: Control other player's cars or spin/rotate (Done by checking the player's actual vehicle).
      Type 3: Fast kick/rotate or teleporting inside drivers. (detectd by position change)
      Type 4: Teleporting inside a vehicle illegally as a driver (without PutPlayerInVehicle or OnPlayerEnterVehicle).
      Type 5: Teleporting inside a vehicle illegally as a passenger (without PutPlayerInVehicle or OnPlayerEnterVehicle).
      Type 6: Remote kick a player by tping a vehicle inside of him. (Too fast the server reads it as an unoccupied vehicle).
      */
      si nu stiu ce sa fac
       eu il am asa :
      public OnPlayerCarTroll(playerid, vehicleid, trolledid, trolltype)
      {
          new KickString[80], cheatername[MAX_PLAYER_NAME]; // Kicking message and cheater's name
          GetPlayerName(playerid, cheatername, sizeof(cheatername));//Saving cheater's name in a string
       
          if(trolledid != INVALID_PLAYER_ID)// If the trolled person is valid
          {
              SendClientMessage(trolledid, -1, "You were trolled but the cheater was taken care of");//Inform him
              format(KickString, sizeof(KickString), "Server has kicked %s , reason: Trolling #%d vehicle %d player %d", cheatername, trolltype, vehicleid, trolledid);//Kick with a reasonable message
          }
       
          else format(KickString, sizeof(KickString), "Server has kicked %s , reason: Trolling #%d vehicle %d", cheatername, trolltype, vehicleid);//If no one was trolled kick the troller normally
       
          SendClientMessageToAll(-1, KickString);//Sending the finalized string
          Kick(playerid);//Kicking the cheater
       
          return 1;
      }
      si imi da error.
      Va rog
      Ma poate ajuta cnv ?
      :((
    • By nobilzeusAdv
      anti-cheatul contine: anti-repair vehicle, anti-explode vehicle, anti-flame vehicle, anti-trow vehicle (atunci cand se trag masinile de pe server catre jucatorul cu hack), anti-lagger vehicle (atunci cand mai multe masini sunt puse in acelasi loc si face lag)
      pret: 10 euro
      anticheat-ul este la sfarsit:
       
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.