Raised This Month: $1944 Target: $400
 486% 

CS:GO Graffiti


Post New Thread Reply   
 
Thread Tools Display Modes
Cirovic
Senior Member
Join Date: Sep 2019
Old 07-30-2020 , 14:26   Re: CS:GO Graffiti
Reply With Quote #11

[ 2] Reunion, v0.1.0.92, 2018-02-11, by The Legion, see
Cirovic is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-30-2020 , 16:43   Re: CS:GO Graffiti
Reply With Quote #12

Compile the plugin under the same version AMXX your server is using.
__________________

Last edited by OciXCrom; 07-30-2020 at 16:43.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
AlinT
Member
Join Date: Jun 2020
Location: Romania
Old 07-31-2020 , 16:14   Re: CS:GO Graffiti
Reply With Quote #13

Quote:
Originally Posted by OciXCrom View Post
Compile the plugin under the same version AMXX your server is using.

I did this and unfortunately it still doesn't work ... you can help me .. maybe you can do something better, possibly if you can do a test before.

Ps: please help me, I have great confidence in you
AlinT is offline
Send a message via AIM to AlinT
AlinT
Member
Join Date: Jun 2020
Location: Romania
Old 07-31-2020 , 17:40   Re: CS:GO Graffiti
Reply With Quote #14

I managed to make it work just because, he was right, it only works non-steam ... well, those who have steam can't download the spr file ... is there a solution or does anyone even have another similar plugin?
AlinT is offline
Send a message via AIM to AlinT
Cirovic
Senior Member
Join Date: Sep 2019
Old 07-31-2020 , 18:17   Re: CS:GO Graffiti
Reply With Quote #15

what ?!!? steam players can download everything liek nonsteam players i just told that YOUR server is NONSTEAM and this forum is for STEAM servers.. thats all
Cirovic is offline
AlinT
Member
Join Date: Jun 2020
Location: Romania
Old 08-02-2020 , 11:27   Re: CS:GO Graffiti
Reply With Quote #16

L 08/02/2020 - 17:48:50: [ReAPI] RegisterHookChain: function (CBasePlayer_PreThink) is not available, ReGameDLL required.
L 08/02/2020 - 17:48:50: [AMXX] Displaying debug trace (plugin "CSGO_Graffiti_Plugin.amxx", version "2.3")
L 08/02/2020 - 17:48:50: [AMXX] Run time error 10: native error (native "RegisterHookChain")
L 08/02/2020 - 17:48:50: [AMXX] [0] CSGO_Graffiti_Plugin.sma::plugin_init (line 52)

L 08/02/2020 - 17:51:19: [AMXX] Displaying debug trace (plugin "CSGO_Graffiti_Plugin.amxx", version "2.3")
L 08/02/2020 - 17:51:19: [AMXX] Run time error 10: native error (native "rg_create_entity")
L 08/02/2020 - 17:51:19: [AMXX] [0] CSGO_Graffiti_Plugin.sma::Create_Graffiti (line 150)
L 08/02/2020 - 17:51:19: [AMXX] [1] CSGO_Graffiti_Plugin.sma:rawing_Graffiti (line 319)
L 08/02/2020 - 17:51:19: [AMXX] [2] CSGO_Graffiti_Plugin.sma::client_impulse (line 340)


Can anyone help me with this error?

Quote:
include <amxmodx>
#include <reapi>
#include <engine>
#include <fakemeta>

#define PLUGIN "CSGO Grafiti Plugin"
#define VERSION "2.3"
#define AUTHOR "Fatih ~ EjderYa" //ReAPI Yek'-ta

#define is_player(%1) ( 1 <= %1 <= MaxClients )

#define GRAFFITI_SOUND "Grafiti_Print.wav"
#define GRAFFITI_MODEL "sprites/CsgoGraffiti.spr"

#define Grafiti_Max_Colour_Client 12
#define Grafiti_Max_Seymbol_Client 38
#define Field_Control_Constant 50.0

new Float:Graffiti_Drawing_Second[MAX_PLAYERS] , Graffiti_Colour[MAX_PLAYERS] , Graffiti_Symbol[MAX_PLAYERS] , Menu_Status[MAX_PLAYERS] , ent_Menu[MAX_PLAYERS]
new Float:cvar_graffiti_reload_time , Float:cvar_graffiti_visibility_time , Float:cvar_graffiti_fade_away_time , Float:cvar_graffiti_distance

new const Float:g_Colors[][3] =
{
// R G B
{255.0, 255.0, 0.0}, // 0
{255.0, 195.0, 0.0}, // 1
{255.0, 143.0, 0.0}, // 2
{255.0, 91.0, 4.0}, // 3
{255.0, 9.0, 19.0}, // 4
{220.0, 8.0, 158.0}, // 5
{166.0, 26.0, 166.0}, // 6
{111.0, 37.0, 167.0}, // 7
{0.0, 122.0, 218.0}, // 8
{0.0, 122.0, 67.0}, // 9
{0.0, 184.0, 74.0}, // 10
{255.0, 255.0, 255.0}, // 11
{132.0, 208.0, 32.0} // 12
}

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)

cvar_graffiti_reload_time = get_pcvar_float(register_cvar("graffiti_reloa d_time","45"))
cvar_graffiti_visibility_time = get_pcvar_float(register_cvar("graffiti_visib ility_time","25"))
cvar_graffiti_fade_away_time = get_pcvar_float(register_cvar("graffiti_fade_ away_time","30"))
cvar_graffiti_distance = get_pcvar_float(register_cvar("graffiti_dista nce","150.0"))

register_clcmd("say /graffiti","graffiti_menu")
register_clcmd("say .graffiti","graffiti_menu")

RegisterHookChain(RG_CBasePlayer_PreThink, "RG_PreThink",true);

register_dictionary("CSGO_Grafiti.txt")
}

public RG_PreThink(id){
if(pev_valid(ent_Menu[id])){
set_entvar(ent_Menu[id], var_renderamt, 255.0);
set_entvar(ent_Menu[id], var_scale, 0.015);

if ( Menu_Status[id] != 0 ){
new Float: Angles[3] , Float:Origin[3]
get_entvar(id, var_origin, Origin);
get_entvar(id, var_angles, Angles);


Origin[0] += floatcos(Angles[1],degrees) * 7.0
Origin[1] += floatsin(Angles[1],degrees) * 7.0
Origin[2] += 15.0

Angles[0] += 180.0
Angles[1] += 180.0
Angles[2] += 180.0

set_entvar(ent_Menu[id], var_angles, Angles);
set_entvar(ent_Menu[id], var_origin, Origin);
}
}
}
public graffiti_menu(id){
new Menu_title[128] , Symbol_Text[10] , Colour_Text[10]

if ( Graffiti_Symbol[id] == Grafiti_Max_Seymbol_Client )
formatex(Symbol_Text,charsmax(Symbol_Text),"% L",id,"RANDOM")
else formatex(Symbol_Text,charsmax(Symbol_Text),"% d",Graffiti_Symbol[id]+1)

if ( Graffiti_Colour[id] == Grafiti_Max_Colour_Client +1 )
formatex(Colour_Text,charsmax(Colour_Text),"% L",id,"RANDOM")
else formatex(Colour_Text,charsmax(Colour_Text),"% d",Graffiti_Colour[id]+1)

formatex(Menu_title,charsmax(Menu_title),"\r* ** \w%L \r***\d^n^n\w%L : \r%s^n\w%L : \r%s",id,"MENU_TITLE",id,"SYMBOL",Symbol_Text ,id,"COLOUR",Colour_Text)

new graffiti_menu = menu_create(Menu_title, "graffiti_menu_transaction")

new Menu_Options[32]

formatex(Menu_Options,charsmax(Menu_Options), "\w%L",id,"NEXT_SYMBOL")
menu_additem(graffiti_menu , Menu_Options, "1")

formatex(Menu_Options,charsmax(Menu_Options), "\w%L^n",id,"BACK_SYMBOL")
menu_additem(graffiti_menu , Menu_Options, "2")

formatex(Menu_Options,charsmax(Menu_Options), "\w%L",id,"NEXT_COLOUR")
menu_additem(graffiti_menu , Menu_Options, "3")

formatex(Menu_Options,charsmax(Menu_Options), "\w%L",id,"BACK_COLOUR")
menu_additem(graffiti_menu , Menu_Options, "4")

formatex(Menu_Options,charsmax(Menu_Options), "\w%L",id,"EXIT")
menu_setprop(graffiti_menu,MPROP_EXITNAME,Men u_Options)
menu_setprop(graffiti_menu,MPROP_EXIT, MEXIT_NORMAL)

menu_display(id,graffiti_menu)

if ( !pev_valid(ent_Menu[id]) )
create_menu_entity(id)

if ( Menu_Status[id] == 0 ) set_task(5.0,"Menu_Status_Algilaperceive",id)
Menu_Status[id] += 1
return PLUGIN_HANDLED

}
public graffiti_menu_transaction(id, Menu , item){
new data[6], iName[64]
new acces, callback
menu_item_getinfo(Menu, item, acces, data,5, iName, 63, callback)

switch(str_to_num(data)){
case 0 : Menu_Status[id] = 0
case 1 : Graffiti_Symbol[id] += 1
case 2 : Graffiti_Symbol[id] -= 1
case 3 : Graffiti_Colour[id] += 1
case 4 : Graffiti_Colour[id] -= 1
}

if ( Graffiti_Symbol[id] < 0 ) Graffiti_Symbol[id] = Grafiti_Max_Seymbol_Client
else if ( Graffiti_Symbol[id] > Grafiti_Max_Seymbol_Client ) Graffiti_Symbol[id] = 0

if ( Graffiti_Colour[id] < 0 ) Graffiti_Colour[id] = Grafiti_Max_Colour_Client + 1
else if ( Graffiti_Colour[id] > Grafiti_Max_Colour_Client + 1 ) Graffiti_Colour[id] = 0

Symbol_and_Colur_Control(id,ent_Menu[id])

if(str_to_num(data) != 0) graffiti_menu(id)
}

public Create_Graffiti(id,Float:Origin[3], Float:Angles[3], Float:vNormal[3]){
Graffiti_Drawing_Second[id] = get_gametime()
new MODEL_ent = rg_create_entity("env_sprite");
if (pev_valid(MODEL_ent) )
{

Origin[0] += (vNormal[0] * 0.5);
Origin[1] += (vNormal[1] * 0.5);
Origin[2] += (vNormal[2] * 0.5);

entity_set_string(MODEL_ent, EV_SZ_classname, "CSGO_Grafiti" );
entity_set_model(MODEL_ent, GRAFFITI_MODEL);
entity_set_vector(MODEL_ent, EV_VEC_angles, Angles ) ;

set_entvar(MODEL_ent, var_rendermode, kRenderTransAlpha);

new Seymbol
if ( Graffiti_Symbol[id] > Grafiti_Max_Seymbol_Client - 1 ) Seymbol = random_num(0,Grafiti_Max_Seymbol_Client - 1)
else Seymbol = Graffiti_Symbol[id]
entity_set_float(MODEL_ent, EV_FL_frame, float(Seymbol) );

if ( Seymbol == 0 ) entity_set_float(MODEL_ent, EV_FL_scale, 0.13);
else entity_set_float(MODEL_ent, EV_FL_scale, 0.25);

if ( Seymbol != 0 ){
new Colour
if ( Graffiti_Colour[id] > Grafiti_Max_Colour_Client ) Colour = random_num(0,Grafiti_Max_Colour_Client)
else Colour = Graffiti_Colour[id]
set_entvar(MODEL_ent, var_rendercolor, g_Colors[Colour]);
}
else set_entvar(MODEL_ent, var_rendercolor, {255.0,255.0,255.0})


set_entvar(MODEL_ent, var_renderamt, 255.0);
entity_set_origin(MODEL_ent, Origin);
emit_sound(MODEL_ent, CHAN_ITEM, GRAFFITI_SOUND, 0.70, ATTN_NORM, 0, PITCH_NORM)
set_task(cvar_graffiti_visibility_time,"Remov e_Graffiti",MODEL_ent)
}
return PLUGIN_CONTINUE
}
public overflow_graffiti_detect(Float:i_Origin[3], Float:i_Angles[3], Float:vNormal[3]){
new Float:Origin[3] , Float:Angles[3]
Angles[0] = i_Angles[0]


Origin[0] = i_Origin[0] + (vNormal[0] * 0.5);
Origin[1] = i_Origin[1] + (vNormal[1] * 0.5);
Origin[2] = i_Origin[2] + (vNormal[2] * 0.5);


Origin[0] = i_Origin[0] + floatcos(i_Angles[1] , degrees ) * 5.0
Origin[1] = i_Origin[1] + floatsin(i_Angles[1] , degrees ) * 5.0
Origin[2] = i_Origin[2] + floatsin(i_Angles[2] , degrees ) * 5.0 * floatpower(2.0,0.5)

new Status

Angles[1] = i_Angles[1] + 270.0
Angles[2] = i_Angles[2] + 45.0
Status += Spawn_in_wall_detect(Origin,Angles)
Angles[2] -= 90.0
Status += Spawn_in_wall_detect(Origin,Angles)
Angles[1] += 180.0
Status += Spawn_in_wall_detect(Origin,Angles)
Angles[2] += 90.0
Status += Spawn_in_wall_detect(Origin,Angles)

if ( Status != 4 )
return false

return true
}
public Spawn_in_wall_detect(Float:Origin[3],Float:Angles[3]){
new Float:New_Origin[3]
New_Origin[0] = Origin[0] + floatcos(Angles[1] , degrees ) * Field_Control_Constant / 2.0
New_Origin[1] = Origin[1] + floatsin(Angles[1] , degrees ) * Field_Control_Constant / 2.0
New_Origin[2] = Origin[2] + floatsin(Angles[2] , degrees ) * Field_Control_Constant * floatpower(2.0,0.5) / 2.0
if(engfunc(EngFunc_PointContents, New_Origin) == CONTENTS_EMPTY) /// IN WALL : 1 - OUT WALL 0
return false

return true
}
public plugin_precache(){
precache_model(GRAFFITI_MODEL)
precache_sound(GRAFFITI_SOUND);
}

public client_putinserver(id){
Graffiti_Drawing_Second[id] = get_gametime() - cvar_graffiti_reload_time
Graffiti_Colour[id] = Grafiti_Max_Colour_Client + 1
Graffiti_Symbol[id] = Grafiti_Max_Seymbol_Client
}
public create_menu_entity(id){
new Float:Origin[3]
get_entvar(id, var_origin, Origin);
if(engfunc(EngFunc_PointContents, Origin) == CONTENTS_EMPTY){
ent_Menu[id] = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "env_sprite" ) )

set_entvar(ent_Menu[id], var_origin, Origin);
set_entvar(ent_Menu[id], var_solid, SOLID_NOT);
engfunc( EngFunc_SetModel, ent_Menu[id], GRAFFITI_MODEL )
set_entvar(ent_Menu[id], var_rendermode, kRenderTransAlpha);
set_entvar(ent_Menu[id], var_renderamt, 0.0);
Symbol_and_Colur_Control(id,ent_Menu[id])
}
}
public Symbol_and_Colur_Control(id,Graffiti_ent){


if(pev_valid(ent_Menu[id]) ) {
new Float:Colour[3]
if ( Graffiti_Symbol[id] != 0 ){
if ( Graffiti_Colour[id] == Grafiti_Max_Colour_Client +1 )
{
Colour[0] = 50.0
Colour[1] = 50.0
Colour[2] = 50.0
}
else
{
Colour[0] = g_Colors[Graffiti_Colour[id]][0]
Colour[1] = g_Colors[Graffiti_Colour[id]][1]
Colour[2] = g_Colors[Graffiti_Colour[id]][2]
}
}
else Colour[0] = 255.0 , Colour[1] = 255.0 , Colour[2] = 255.0

set_entvar(Graffiti_ent, var_rendercolor, Colour);
set_entvar(Graffiti_ent, var_frame, float(Graffiti_Symbol[id]));
}

}
public Drawing_Graffiti(id){

new Center_Origin[3];
new Float:vCenter_Origin[3];
new Float:Angles[3];
new Float:vNormal[3];
get_user_origin(id, Center_Origin, 3);
IVecFVec(Center_Origin, vCenter_Origin);
new Float:vPlayerCenter_Origin[3];
new Float:vViewOfs[3];
entity_get_vector(id, EV_VEC_origin, vPlayerCenter_Origin);
entity_get_vector(id, EV_VEC_view_ofs, vViewOfs);
vPlayerCenter_Origin[0] += vViewOfs[0];
vPlayerCenter_Origin[1] += vViewOfs[1];
vPlayerCenter_Origin[2] += vViewOfs[2];
new Floatlayer_Aim[3];
entity_get_vector(id, EV_VEC_v_angle, Angles);
Player_Aim[0] = vPlayerCenter_Origin[0] + floatcos(Angles[1], degrees ) * cvar_graffiti_distance;
Player_Aim[1] = vPlayerCenter_Origin[1] + floatsin(Angles[1], degrees) * cvar_graffiti_distance;
Player_Aim[2] = vPlayerCenter_Origin[2] + floatsin(-Angles[0], degrees) * cvar_graffiti_distance;
new Intersection_Status = trace_normal(id, vPlayerCenter_Origin, Player_Aim, vNormal);
vector_to_angle(vNormal, Angles)
Angles[1] += 180.0

if ( Graffiti_Drawing_Second[id] + cvar_graffiti_reload_time > get_gametime() ){
client_print(id,print_center,"%L",id,"WAIT_SP RITE",Graffiti_Drawing_Second[id] + cvar_graffiti_reload_time+1.0 - get_gametime())
return PLUGIN_HANDLED
}
if ( !Intersection_Status ){
client_print(id,print_center,"%L",id,"REMOTE_ GROUND")
return PLUGIN_HANDLED
}
if ( vNormal[2] != 0.0 ){
client_print(id,print_center,"%L",id,"NOVERTI CALWALL")
return PLUGIN_HANDLED
}
if ( !overflow_graffiti_detect(vCenter_Origin, Angles, vNormal) ){
client_print(id,print_center,"%L",id,"OVERFLO WING_GRAFFITI")
return PLUGIN_HANDLED
}
Create_Graffiti(id,vCenter_Origin, Angles, vNormal)
return PLUGIN_CONTINUE
}
public Remove_Graffiti(ent){
if ( pev_valid(ent) ) {
new Float:Transparency
get_entvar(ent, var_renderamt, Transparency);
Transparency -= 2.5
if ( Transparency <= 2.5 ){
remove_entity(ent)
}
else
{
set_entvar(ent, var_renderamt, Transparency);
set_task(cvar_graffiti_fade_away_time/102.0,"Remove_Graffiti",ent)
}
}
}
public client_impulse(id,impulse){
if ( impulse == 201 )
if ( is_user_alive(id) ){
Drawing_Graffiti(id)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public Menu_Status_Algilaperceive(id){

if ( Menu_Status[id] != 0 ){
if ( Menu_Status[id] > 5 ) Menu_Status[id] = 5
else Menu_Status[id] -= 1
set_task(1.0,"Menu_Status_Algilaperceive",id)
}
else if ( pev_valid(ent_Menu[id]) ) remove_entity(ent_Menu[id])

}
AlinT is offline
Send a message via AIM to AlinT
Cirovic
Senior Member
Join Date: Sep 2019
Old 08-02-2020 , 11:38   Re: CS:GO Graffiti
Reply With Quote #17

ReGameDLL required.
Cirovic is offline
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

Forum Jump


All times are GMT -4. The time now is 06:53.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode