[FilterScript] [FS] Sprays in LS
#1

I was inspired by some guy that made a Spraying FS (just for placing sprays everywhere) so I made my own, but more with a gamemode purpose.

It's basically Los Santos with spraying locations all over it (the West side - aka - All the city west to the dividing highway). You have to go near any of this locations (they are shown as "S" icons in map, and they are marked with 3dLabels when you go near them) and, with a can in hand, press fire to spray. If you get the right spot a "Spraying!" text will show up and after two seconds a random graffiti gets placed.

There are also some hidden sprays that are not shown in map, but they are marked with 3d labels when you go near them.

I quit using it for now because i'm re-writing my GM from scratch and I decided to share it with you, if anyone happens to find it usefull.

You will have to make the appropriate changes to merge it with your GM (although it's very stand-alone), cus im sharing it as I just found it (maybe translated some spanish sentences :P).

Pastebin: http://pastebin.com/vBDP91Hb (removed the unnecessary include)

Bye bye.

Reply
#2

ok nice :P
Reply
#3

"#include <grabandrun>"

Not found...
Reply
#4

sounds cool!cud be awzum if it cud be in SF !:P
Reply
#5

Quote:
Originally Posted by UnHead
"#include <grabandrun>"

Not found...
Just deletet:

#include <grabandrun>
#pragma unused Bars

And you will good to go.

Reply
#6

Quote:
Originally Posted by Fog™
sounds cool!cud be awzum if it cud be in SF !:P
It can, and it's pretty easy, although it will require some work from you to do.

Look at the code, it's almost automatic the process:

Code:
if(IsPlayerInRangeOfPoint(playerid, 1.0, 893.3028,-1117.3040,24.1885) && (angle >= 172 && angle <= 205)) // 1
	{
       SetPlayerPos(playerid, 893.2590,-1116.1653,24.2183); // 2
       SetPlayerFacingAngle( playerid, 182 ); // 3
       SPRAYMSG // 4
       Timer[playerid] = SetTimerEx("OnPlayerSpray",2000,false,"diffffii",playerid,0,893.3028,-1117.6,24.1885,270.0,400, newkeys); // 5
	}
1 - Here you have to set the playerid, the x,y & z positions of where to stand to spray and the angle to look at when spraying.
2 - Here you have to set the playerid position to place him when he starts spraying.
3 - The angle the player will face when spraying.
4 - This is a message defined in the first lines of the script.
5 - This is the function itself. Parameters are (diffffi): playerid - idofthespray - X,Y & Z pos of the spray, Angle of the spray, moneygivenforspray - the key to pass. <-- I had to pass the key because when playing with another player, it wouldn't recognize the keys he pressed, but mine did. I guess this was more related to my npc filterscript.

Anyway, just read the code and you'll find it's pretty simple. And a suggestion i didn't do: add an angle check when the player sprays, becuse he can look the otherway around when he pressed the KEY_FIRE and still spray.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)