[Include] Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support)
#1

→ About

Cyanide's Gang Spray/Tag System was inspired by GTA:SA mission Tagging Up Turf. A summary of the link is that Sweet and CJ find multiple Ballas tags and over-spray them with their families' tag. This is my first release, and in my opinion it's a bit cheesy. Everyone improves.

→ Advantages
  • Plug N' Play
  • Loading and Saving (SQLite)
  • Spraying Permission
  • Useful Callbacks
→ Disadvantages
  • Inaccurate Wall Accurancy (Not detectable in SA:MP)
→ Optional Callbacks

pawn Код:
public OnPlayerReceiveSprayPermission( playerid, errorID )
{
      if( !errorID )
          printf("clientid %i has just received spraying permission.", playerid);
 
      return true;
}

public OnPlayerCreateSpray( playerid, sprayID )
{
      printf( "SprayID: %i has been created.", sprayID );
      static
            s_string[ 100 ],
            File: log
      ;
      GetPlayerName( playerid, s_string, MAX_PLAYER_NAME );
      format( s_string, sizeof s_string, "%s|%i", s_string, gettime( ) );

      log = fopen( "spray_log.log", fexist( "spray_log.log " ) ? io_append : io_open );
      fwrite( log, s_string );
      fclose( log );
}

public OnSprayDelete( sprayID )
{
      printf( "SprayID: %i has been deleted.", sprayID );
      return true;
}
→ Functions

pawn Код:
Spray::givePlayerPermission( clientid, bool:permissionToggle ) -        Allows you to give permission to a sprayer.
Spray::createSprayAtPlayerPos( clientid ) -                             Creates a spray at the player's position.
Spray::Delete( sprayID ) -                                              Deletes a spray.
Spray::Load( ) -                                                        Loads sprays, already called on server start.
Spray::doesPlayerHavePermission( clientid ) -                           Checks if a player has spraying permission.
Spray::UpdateTag( sprayID, sprayTag )                                   Updates a tag'
s spray, refer to the codes below.
→ Codes


pawn Код:
SPRAY_TAG_FYB_1                                                         Front Yard Ballas
SPRAY_TAG_FYB_2                                                         Front Yard Ballas 2
SPRAY_TAG_FYB_3                                                         Front Yard Ballas 3
SPRAY_TAG_RIFA                                                          San Fierro Rifa
SPRAY_TAG_RHB                                                           Rollin Heights Ballas
SPRAY_TAG_SEVILLE                                                       Seville Families
SPRAY_TAG_TEMPLE                                                        Temple Drive
SPRAY_TAG_AZTECAS                                                       Aztecas
→ Video

[ame]http://www.youtube.com/watch?v=0zTWUJuhtHk[/ame]
The night-time scenery music is low.
→ Download

.inc download.
YSI package download
GVar Plugin Download

→ FAQ

File or function is not found
You're missing the gvar plugin. Download the Gvar plugin in the downloads section of this thread and load it properly. If it's loaded but you still get the error, the problem is with the script you're including this include into to.
Why isn't anything spraying?
You're required to be equipped with a spray can weapon (weaponID 41). Once you're equipped, spray the tag you want against the wall, if nothing happens make sure you give the player permission by using the function Spray::givePlayerPermission. If you're unsure where to put this, simply put it in OnPlayerConnect. A example is below:
pawn Код:
public OnPlayerConnect( playerid )
{
     Spray::givePlayerPermission( playerid, true );
     return true;
}
→ Credits

Код:
Cyanide - 		Project Launcher & Developer
Bakr - 			Helping with trigonometry functions.
****** -                YSI
Incognito -             Global Variable plugin.
SA-MP Team -     	San Andreas Multiplayer Modification.
Reply


Messages In This Thread
Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 12.06.2011, 17:11
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Donya - 12.06.2011, 17:22
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by lolumadd_ - 12.06.2011, 17:24
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 12.06.2011, 17:24
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Donya - 12.06.2011, 17:26
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 12.06.2011, 17:27
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Donya - 12.06.2011, 18:08
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Lorenc_ - 13.06.2011, 10:35
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by justsomeguy - 13.06.2011, 11:04
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 13.06.2011, 19:21
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by justsomeguy - 13.06.2011, 20:25
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 13.06.2011, 20:27
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by BaubaS - 13.06.2011, 22:08
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Jack_Rocker - 13.06.2011, 22:26
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 14.06.2011, 00:03
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by BASITJALIL - 14.06.2011, 02:51
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Ricop522 - 14.06.2011, 03:42
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 14.06.2011, 12:08
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 16.06.2011, 19:18
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Ricop522 - 18.06.2011, 23:29
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Nexotronix - 19.06.2011, 09:51
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by GangsTa_ - 19.06.2011, 09:58
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 19.06.2011, 19:51
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Nexotronix - 19.06.2011, 20:41
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by juraska - 20.06.2011, 11:36
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by BaubaS - 20.06.2011, 12:20
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 20.06.2011, 16:46
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 05.07.2011, 12:33
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by 2-1-d_crew - 06.07.2011, 06:55
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Cyanide - 06.07.2011, 12:27
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Pasa - 12.02.2013, 18:23
Re: Cyanide's Gang Spray/Tag System (Plug n' Play | Saving, Loading, & Crouching Support) - by Manowar - 25.07.2013, 19:25

Forum Jump:


Users browsing this thread: 3 Guest(s)