CrapYoPants -
thefatshizms - 22.02.2013
What is this?
This is the most useless piece of poop you will find in this filterscript forum. It was inspired from this pretty awesome fs
https://sampforum.blast.hk/showthread.php?tid=235383
This filterscript demonstrates how powerful boredem is!
What does it do?
Basically a large cow appears in front ( In their face ) of a random player then playing a nice little sound ( exorcist scream ) and disappears within 2 seconds that's it

To be honest this should of been released around an hour ago but as the exorcist is my worse fear it took time for my balls to grow back.
Screens
Download
http://pastebin.com/Zz03bfKR
In the new version it now sets your weather to raining and stormy ( weather id 8 ) and time to midnight then sets it back
In the end it's probably useless and I don't even know why I made this. May not be scary to you but that scream still scares me!
Bugs
None found, although wasn't tested with more than one players
Credits
Hiddos for the inspiration
Re: CrapYoPants -
Yves - 22.02.2013
hahaha awsome man i like it 10/10
Respuesta: CrapYoPants -
Onfroi - 22.02.2013
hahaha lol lets see if a player gets a heart attack from this xD
Re: CrapYoPants -
Yves - 22.02.2013
i used it and it sacred one of my friends i didnt even tell him it was in or anything i told him to test my house system and that came seriously this is so freakin awsome
Re: CrapYoPants -
thefatshizms - 22.02.2013
Thanks
Re: CrapYoPants -
Gamer_007 - 22.02.2013
hahahahaha nice rep++
Re: CrapYoPants -
Hiddos - 22.02.2013
I like dis
I like dis a lot
Re: CrapYoPants -
Johny32 - 22.02.2013
LoL Nice one
Re: CrapYoPants -
Mean - 22.02.2013
I like this cuz creativity.
Re: CrapYoPants -
thefatshizms - 22.02.2013
Thanks guys :3 glad I could amuse you with this
Re: CrapYoPants -
[L4T]Left4Theft - 22.02.2013
Nice!
Re: CrapYoPants -
IstuntmanI - 22.02.2013
In that 2 seconds make the time 0 and the weather rainy.
Awesome piece of sh*t !
Re: CrapYoPants -
thefatshizms - 22.02.2013
Good idea! I'll add it as soon as I'm on the pc
Re: CrapYoPants -
[L4T]Left4Theft - 22.02.2013
I REALLY ADMIRE IT!
Re: CrapYoPants -
thefatshizms - 22.02.2013
Quote:
Originally Posted by [L4T]Left4Theft
I REALLY ADMIRE IT!
|
Thanks
New version, check front page for info.
Also can anybody confirm this works with more than one player.. As I'm not sure
EDIT: Tested with a friend and it doesn't work with more than one player.. the sound is also not very good so this is a new version:
http://pastebin.com/tjnhrNut
This should
hopefully fix the bug with it only working with one player. It also lets the cow stay for 4 seconds now as the sound file is a bit messed up and the screaming doesn't start till later on.
Re: CrapYoPants -
x96664 - 22.02.2013
Awesomeeeeee now I got to scare some friends
Re: CrapYoPants -
thefatshizms - 22.02.2013
Quote:
Originally Posted by x96664
Awesomeeeeee now I got to scare some friends 
|
I'm sure they will be scared of this scary cow
Re: CrapYoPants -
Hiddos - 22.02.2013
The current one isn't directly 'bugged', but doesn't function the way you want to either. Your GetPlayerID function is still fucked, as it selects ONE random number out of 500 (MAX_PLAYERS), and if that ID is not connected it'll default to '-0' (which is still 0). I'm pretty sure that most of the time the script will then use player ID 0, considering most servers barely have 50 players. Also, just because a server has players, it doesn't mean someone has to be using player id 0. I'd write your GetPlayerID function as following:
pawn Код:
GetPlayerID()
{
new players[MAX_PLAYERS];
new online;
for(new i; i != MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
players[online] = i;
online++;
}
}
if(online == 0) return -1;
return players[random(online)];
}
Now this function also returns -1 when there is
nobody online, something your script does not check for at all! That means that it'll try to spawn a cow (and probably does at (0.0, 0.0, 0.0)) without anyone noticing! Check if this function returns -1, and if so, don't execute the code as it's useless!
Last, your OnFilterScriptExit code lacks. timer[0] will always contain the right value as it's a repeating timer, but the timer assigned to timer[1] is run only once, before a new cow is spawned again. If someone was to create a new timer in the interval between destroying the cow and spawning a new one, the timer could easily get assign the same ID that's in your timer[1] variable. You should check if timer[1] is actually running when you exit the filterscript, and if so, it should kill the cow as well (Because if you unload the script right now the cow will still remain an active object!)
Re: CrapYoPants -
thefatshizms - 22.02.2013
Quote:
Originally Posted by Hiddos
The current one isn't directly 'bugged', but doesn't function the way you want to either. Your GetPlayerID function is still fucked, as it selects ONE random number out of 500 (MAX_PLAYERS), and if that ID is not connected it'll default to '-0' (which is still 0). I'm pretty sure that most of the time the script will then use player ID 0, considering most servers barely have 50 players. Also, just because a server has players, it doesn't mean someone has to be using player id 0. I'd write your GetPlayerID function as following:
pawn Код:
GetPlayerID() { new players[MAX_PLAYERS]; new online; for(new i; i != MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { players[online] = i; online++; } } if(online == 0) return -1; return players[random(online)]; }
Now this function also returns -1 when there is nobody online, something your script does not check for at all! That means that it'll try to spawn a cow (and probably does at (0.0, 0.0, 0.0)) without anyone noticing! Check if this function returns -1, and if so, don't execute the code as it's useless!
Last, your OnFilterScriptExit code lacks. timer[0] will always contain the right value as it's a repeating timer, but the timer assigned to timer[1] is run only once, before a new cow is spawned again. If someone was to create a new timer in the interval between destroying the cow and spawning a new one, the timer could easily get assign the same ID that's in your timer[1] variable. You should check if timer[1] is actually running when you exit the filterscript, and if so, it should kill the cow as well (Because if you unload the script right now the cow will still remain an active object!)
|
Ah thanks for this information, some of which I didn't know. I wasn't sure on the random players ( In fact i was pretty sure it wouldn't work at all but as there was no body online in my skype/xfire [ loner ;( ] i couldnt test it fully.). A question, how do you get to know all this? From experience ? reading the pdf's provided at
http://www.compuphase.com/pawn/pawn.htm#DOWNLOAD_DOCS ? Cause i seriously want to and need to improve my scripting ability's as i want to do this as a job when I'm older.
Although I wasn't expecting this filterscript to get any posts. Neither do I expect many people to use it! As i said it's a useless filterscript I scripted at half one in the morning last night because I was bored.
Re: CrapYoPants -
Hiddos - 22.02.2013
Quote:
Originally Posted by thefatshizms
Ah thanks for this information, some of which I didn't know. I wasn't sure on the random players ( In fact i was pretty sure it wouldn't work at all but as there was no body online in my skype/xfire [ loner ;( ] i couldnt test it fully.). A question, how do you get to know all this? From experience ? reading the pdf's provided at http://www.compuphase.com/pawn/pawn.htm#DOWNLOAD_DOCS ? Cause i seriously want to and need to improve my scripting ability's as i want to do this as a job when I'm older.
Although I wasn't expecting this filterscript to get any posts. Neither do I expect many people to use it! As i said it's a useless filterscript I scripted at half one in the morning last night because I was bored.
|
I learnt pretty much nothing from the PAWN language guide, it's just an awful lot of words. Sure, if I really wanted to master every single aspect of PAWN I might take a look in it, but for people new to scripting/programming it's just terrible and it will only confuse you.
I personally learned a lot from trial-and-error scripting and looking at other scripts and how they did it, for example SeifAdmin (terribly outdated nowadays and it's hard to find a mirror), that's what I'd suggest to new people