Anti bomb spam
#1

Hey everyone, if anyone can spend some time to share knowledge how to make this script,for example a timer on bombing with tanks,hydras and normal granades. Like,timer between 3-4 seconds and if that player spams faster than those 3-4 seconds he gets jailed automatically for 30 seconds. You can PM me too, thanks.


~Radess
Reply
#2

You'll have to use some of your knowledge .. the main idea is to make a variable
new bool:PlayerCanShootMissile[MAX_PLAYERS]; // you put this in top of script
PlayerCanShootMissile[playerid] = true; // On player connect

You'll use this public funtion : OnPlayerKeyStateChange ( In case player pressed FIRE_KEY && Player is in a hunter or tank or hydra && PlayerCanShootMissile[playerid] == true) you do : PlayerCanShootMissile[playerid] = false; SetTimerEx("ResetMissileVariable" ..... );
Else ( you eject player from vehicle + you send him a client message ( Do not abuse .. )


forward ResetMissileVariable(playerid);
public ResetMissileVariable(playerid)
{
PlayerCanShootMissile[playerid] = true;
}

I hope you see my points ... I hope this helped you

// To eject player from vehicle use this : RemovePlayerFromVehicle(playerid);
Reply
#3

Quote:
Originally Posted by Golimad
Посмотреть сообщение
You'll have to use some of your knowledge .. the main idea is to make a variable
new bool:PlayerCanShootMissile[MAX_PLAYERS]; // you put this in top of script
PlayerCanShootMissile[playerid] = true; // On player connect

You'll use this public funtion : OnPlayerKeyStateChange ( In case player pressed FIRE_KEY && Player is in a hunter or tank or hydra && PlayerCanShootMissile[playerid] == true) you do : PlayerCanShootMissile[playerid] = false; SetTimerEx("ResetMissileVariable" ..... );
Else ( you eject player from vehicle + you send him a client message ( Do not abuse .. )


forward ResetMissileVariable(playerid);
public ResetMissileVariable(playerid)
{
PlayerCanShootMissile[playerid] = true;
}

I hope you see my points ... I hope this helped you

// To eject player from vehicle use this : RemovePlayerFromVehicle(playerid);
Not helped ;/ Look

Quote:

C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(290) : error 017: undefined symbol "AllignMaxPlayers"
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(300) : error 017: undefined symbol "GlobalSystem"
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(303) : error 017: undefined symbol "LoadPickups"
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(305) : error 017: undefined symbol "PrepareHouseSystem"
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(306) : error 017: undefined symbol "OutputVehicleData"
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(3960) : warning 211: possibly unintended assignment
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(3960) : error 001: expected token: ")", but found ";"
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(3960) : error 036: empty statement
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(3960) : error 017: undefined symbol "Buylist"
C:\Documents and Settings\admin\Desktop\new\gamemodes\nw.pwn(3960) : fatal error 107: too many error messages on one line

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


9 Errors.

Reply
#4

Ok thanks to radess who posts the question and thanks to you Golimad, you give me the principal idea to do that.
I have this idea before but yours is clear than mine. +rep for you man !
Reply
#5

Quote:
Originally Posted by cielkute
Посмотреть сообщение
Not helped ;/ Look
Well, the problem isn't coming from my idea .. You have some undefined functions there. Try to define them through public functions or stocks. Use Search function in the forums

Quote:
Originally Posted by FilesMAker
Посмотреть сообщение
Ok thanks to radess who posts the question and thanks to you Golimad, you give me the principal idea to do that.
I have this idea before but yours is clear than mine. +rep for you man !
Thank you, sir
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)