SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 26/09/2019, 05:15 PM   #1
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,241
Reputation: 345
Cool Los Santos Gang Graffiti

Hello, I would like to present you the Los Santos Gang Graffiti.

Video:


Installation:
PHP Code:
#include <streamer>
#include <3DTryg>

//#define GRAFFITI_DEFAULT_GANG            0
//#define GRAFFITI_DEFAULT_COLOR        0x003D00FF
//#define GRAFFITI_DEFAULT_NAME            "Sekhmete Axion Rush"

#include <Graffiti>

public OnGameModeInit(){
    
//...load gang meta before init Graffiti
    
Graffiti::Init();
    return 
1;
}

public 
Graffiti::GetPlayerGang(playerid){
    return 
PlayerData[playerid][gang]; //your variable returning gangid
}

//called after player change graffiti tag
public OnGraffitiTagChanged(mobid,playerid,gangid,old_gangid){
    new 
buffer[32];
    
format(buffer,sizeof(buffer),"~w~Tag painted ~n~%d of %d",Graffiti::CountGangTags(gangid),MAX_GRAFFITI);
    
GameTextForPlayer(playerid,buffer,3000,4);
    
    
//Graffiti::SetGangName(mobid,0xDBDE1FFF,"Grove Street");
    
return 1;
}

//called after server init
public OnGraffitiTagCreated(mobid,gangid){
    
    
//Graffiti::SetGangName(mobid,0xDBDE1FFF,"Grove Street");
    
return 1;

Download:
Graffiti.inc
graffiti.bin (put in /scriptfiles)
3DTryg.inc Thread

Notice:
Filterscript not exist because filterscripts have limits.
This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


Non-Registered Users:
Bug Report

Last edited by AbyssMorgan; 27/09/2019 at 05:28 PM. Reason: Update v1.0.2
AbyssMorgan is offline   Reply With Quote
Old 27/09/2019, 05:59 AM   #2
Kruno88
Huge Clucker
 
Kruno88's Avatar
 
Join Date: Apr 2014
Posts: 341
Reputation: 56
Default Re: Los Santos Gang Graffiti

Nice script brother
Kruno88 is offline   Reply With Quote
Old 27/09/2019, 08:42 AM   #3
JamesBaxter
Little Clucker
 
JamesBaxter's Avatar
 
Join Date: Nov 2017
Posts: 7
Reputation: 6
Default Re: Los Santos Gang Graffiti

Epic script, thanks Abyss!
JamesBaxter is offline   Reply With Quote
Old 27/09/2019, 02:43 PM   #4
IzadorO
Big Clucker
 
IzadorO's Avatar
 
Join Date: Feb 2015
Location: Scotland, Glasgow
Posts: 145
Reputation: 7
Default Re: Los Santos Gang Graffiti

This is actually very useful, great release!
IzadorO is offline   Reply With Quote
Old 27/09/2019, 04:38 PM   #5
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 512
Reputation: 18
Default Re: Los Santos Gang Graffiti

I have a question.

On OnGraffitiTagChanged i use my custom stock ReturnGangName which changes the graffiti text with player's gang name. It works.

But if i restart the server i still get the default graffiti name.

How to retrieve gang name on server start and set it using OnGraffitiTagCreated?

I don't get it.
__________________


Discord | Play Now | Website

Add your server to favourites and join our Discord.
Symon is online now   Reply With Quote
Old 27/09/2019, 04:57 PM   #6
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,241
Reputation: 345
Default Re: Los Santos Gang Graffiti

Quote:
Originally Posted by KeyOfKey View Post
I have a question.

On OnGraffitiTagChanged i use my custom stock ReturnGangName which changes the graffiti text with player's gang name. It works.

But if i restart the server i still get the default graffiti name.

How to retrieve gang name on server start and set it using OnGraffitiTagCreated?

I don't get it.
You need change tag name here also
PHP Code:
//called after server init
public OnGraffitiTagCreated(mobid,gangid){
    
    
//Graffiti::SetGangName(mobid,0xDBDE1FFF,"Grove Street");
    
return 1;

AbyssMorgan is offline   Reply With Quote
Old 27/09/2019, 05:14 PM   #7
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 512
Reputation: 18
Default Re: Los Santos Gang Graffiti

Yes i know about part, it's what i mentioned. But the "Groove Street" part which code should i add to retrieve stored gang name?
__________________


Discord | Play Now | Website

Add your server to favourites and join our Discord.
Symon is online now   Reply With Quote
Old 27/09/2019, 05:29 PM   #8
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,241
Reputation: 345
Default Re: Los Santos Gang Graffiti

Quote:
Originally Posted by KeyOfKey View Post
Yes i know about part, it's what i mentioned. But the "Groove Street" part which code should i add to retrieve stored gang name?
Example for GangData[gangid][name] but now i think your cann't load gang names before my script loaded
Code:
//called after player change graffiti tag
public OnGraffitiTagChanged(mobid,playerid,gangid,old_gangid){
    new buffer[32];
    format(buffer,sizeof(buffer),"~w~Tag painted ~n~%d of %d",Graffiti::CountGangTags(gangid),MAX_GRAFFITI);
    GameTextForPlayer(playerid,buffer,3000,4);
    
    //Graffiti::SetGangName(mobid,0xDBDE1FFF,GangData[gangid][name]);
    return 1;
}

//called after server init
public OnGraffitiTagCreated(mobid,gangid){
    
    //Graffiti::SetGangName(mobid,0xDBDE1FFF,GangData[gangid][name]);
    return 1;
}
Update v1.0.2:

- Added function:
PHP Code:
Graffiti::Init(); 
- Removed auto Graffiti Init
AbyssMorgan is offline   Reply With Quote
Old 27/09/2019, 05:43 PM   #9
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 512
Reputation: 18
Default Re: Los Santos Gang Graffiti

On OnGraffitiTagChanged to set gang name i use ReturnGangName which it works.

For loading them on start do i need to use GangData[gangid][name] instead?
__________________


Discord | Play Now | Website

Add your server to favourites and join our Discord.
Symon is online now   Reply With Quote
Old 27/09/2019, 06:34 PM   #10
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,241
Reputation: 345
Default Re: Los Santos Gang Graffiti

Quote:
Originally Posted by KeyOfKey View Post
On OnGraffitiTagChanged to set gang name i use ReturnGangName which it works.

For loading them on start do i need to use GangData[gangid][name] instead?
this is example, you need set gang name using gangid
AbyssMorgan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] Los Santos Gang War 0.3e [NEW !] [DC]Coslo Gamemode Scripts 25 10/10/2018 04:43 PM
[GameMode] Los Santos Gang Wars - V1.0 MikeB Gamemode Scripts 2 14/09/2014 06:47 AM
[GameMode] [GM] Los Santos Gang War by LethaL (Working gang areas /turfs!) LethaL Gamemode Scripts 88 09/04/2012 12:49 PM
[GameMode] Los Santos Gang War Alexy_Dramon Gamemode Scripts 18 13/03/2012 08:31 PM


All times are GMT. The time now is 07:14 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.