Random Hit/Mission System -
NealPeteros - 08.04.2017
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- Login as an RCON Administrator
- Use /startnewhit to start the 2 minute wait
- After the 2 minute wait, a random player should be assigned as the random hit
- 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
Re: Random Hit/Mission System -
NealPeteros - 08.04.2017
Editted
Re: Random Hit/Mission System -
Electron123 - 08.04.2017
Can I use it in my freeroam server?
Re: Random Hit/Mission System -
NealPeteros - 08.04.2017
Quote:
Originally Posted by Electron123
Can I use it in my freeroam server?
|
Yeah, sure. Asking for permission of usage wouldn't be necessary. The script's all yours
Re: Random Hit/Mission System -
Bolex_ - 08.04.2017
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;
Re: Random Hit/Mission System -
NealPeteros - 08.04.2017
Quote:
Originally Posted by Bolex_
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.
Re: Random Hit/Mission System -
Eatos - 11.04.2017
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)
Re: Random Hit/Mission System -
NealPeteros - 11.04.2017
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
Re: Random Hit/Mission System -
Eatos - 11.04.2017
Quote:
Originally Posted by NealPeteros
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!
Re: Random Hit/Mission System -
NealPeteros - 11.04.2017
Quote:
Originally Posted by Eatos
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.