[FilterScript] Random Hit/Mission System
#1

Random Hit/Mission System
________________________________________________
Random Hit/Mission System is a Filterscript made for any type of gamemode, may be a Freeroam, Cops 'n Robbers, Team Deathmatch, Deathmatch, etcetera etcetera. It features a random connected player to be assigned as the "hit" and the mission is to kill him. The killer gains a prize of a random bounty of or below $500,000 which is editable through finding #define BOUNTYMONEY. The random hit can be started by a RCON Administrator, also editable to your own administrative enumerator, through /startnewhit. After using this command, a 2 minute wait is given then the hit is assigned to a random player. It is a simple system and, I bet, is a user-friendly code.

Usage Instructions
  1. Login as an RCON Administrator
  2. Use /startnewhit to start the 2 minute wait
  3. After the 2 minute wait, a random player should be assigned as the random hit
  4. Kill the hit to earn your very own prize
Media and Photos
/startnewhit is called, the 2 minute wait starts

After 2 minutes, a random player is picked as the "hit"


Credits
  • NealPeteros - Created the whole script from basic scratch
  • SAMP Community - Providing the necessary needs for this filterscript(Self-explainable)
  • PAWN - Programming Language used for this filterscript(Self-explainable)
  • PAWNO - Provided program that is responsible for PAWN, and all contents of this filterscript(Self-explainable)
Download Access
Reply
#2

Editted
Reply
#3

Can I use it in my freeroam server?
Reply
#4

Quote:
Originally Posted by Electron123
View Post
Can I use it in my freeroam server?
Yeah, sure. Asking for permission of usage wouldn't be necessary. The script's all yours
Reply
#5

All this publics you're have there and you're not using it are unnecessary! Also use GetPlayerPoolSize instead

All these could be made in one line

Code:
new connectedids[MAX_PLAYERS];
new onlineplayers;
new playername[MAX_PLAYER_NAME+5];
 
new hiton = -1;
 
new recenthit = 0;
 
new bounty;
new bonus;
Reply
#6

Quote:
Originally Posted by Bolex_
View Post
All this publics you're have there and you're not using it are unnecessary! Also use GetPlayerPoolSize instead

All these could be made in one line

Code:
new connectedids[MAX_PLAYERS];
new onlineplayers;
new playername[MAX_PLAYER_NAME+5];
 
new hiton = -1;
 
new recenthit = 0;
 
new bounty;
new bonus;
Edited, sorry bout that, haven't got the time.
Reply
#7

I'm trying to use this great filterscript in SATDM but I can't get it to work.
Whenever I type the command in order to start a new random hit, nothing comes up.
I've simply commented the unnecessary lines but still, I don't know what's wrong.
PasteBin
(I'm a complete noob btw)
Reply
#8

Hey, I tried debugging your script, especially the code of the command, and here's the funny thing. When I almost lost all hope, I realized there was one more thing I didn't try yet, and I didn't notice, and that was to try to un-comment the "unnecessary" lines you commented, turns out they were "necessary". Never comment those lines, they're completely necessary for either a filterscript or a gamemode.
Pastebin
Reply
#9

Quote:
Originally Posted by NealPeteros
View Post
Hey, I tried debugging your script, especially the code of the command, and here's the funny thing. When I almost lost all hope, I realized there was one more thing I didn't try yet, and I didn't notice, and that was to try to un-comment the "unnecessary" lines you commented, turns out they were "necessary". Never comment those lines, they're completely necessary for either a filterscript or a gamemode.
Pastebin
Thanks.
I tried debugging the script as well (actually, that's what I'm doing right now) and noticed that the code never enters the if condition that requires "recenthit" to be equal or great than 1, because recenthit never changes (it is always equal to 0).
Am I wrong?

EDIT: Got it to work. Thanks!
Reply
#10

Quote:
Originally Posted by Eatos
View Post
the code never enters the if condition that requires "recenthit" to be equal or great than 1, because recenthit never changes (it is always equal to 0).
Absolutely, should've changed that. Oh well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)