Raised This Month: $ Target: $400
 0% 

[HELP ] editing script :)


Post New Thread Reply   
 
Thread Tools Display Modes
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 02-16-2016 , 13:38   Re: [HELP ] editing script :)
Reply With Quote #11

Quote:
Originally Posted by KliPPy View Post
So, he is a non-Steamer because he has no Steam signature? Here, I have no Steam profile link in my signature.
cause i know this guy -_-
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
bilel_ghost
Junior Member
Join Date: Jan 2016
Old 02-22-2016 , 14:26   Re: [HELP ] editing script :)
Reply With Quote #12

A "7mra-ka7la" timchichi tnayek !!
bilel_ghost is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 02-22-2016 , 18:08   Re: [HELP ] editing script :)
Reply With Quote #13

ghost hacked next of you kid
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
crnova
Senior Member
Join Date: Sep 2015
Old 02-22-2016 , 18:42   Re: [HELP ] editing script :)
Reply With Quote #14

Quote:
Originally Posted by JoaoVieira View Post
this might work , try it

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <xs>

#define PLUGIN "Magic Marker"
#define VERSION "3.1"
#define AUTHOR "stupok69"

#define MAX_PLAYERS 32


#define USAGE_LEVEL g_iSimon

new Float:origin[MAX_PLAYERS+1][3]
new 
prethink_counter[MAX_PLAYERS+1]
new 
bool:is_drawing[MAX_PLAYERS+1]
new 
bool:is_holding[MAX_PLAYERS+1]

new 
spriteid

#if defined USE_SIMON 
new g_iSimon;
#endif




public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
#if defined USE_SIMON
    
g_iSimon get_xvar_id"g_iSimon" );
    
register_clcmd("+paint""paint_handler"USAGE_LEVEL"Paint on the walls!")
    
register_clcmd("-paint""paint_handler"USAGE_LEVEL"Paint on the walls!")
    
#endif
    
    
register_forward(FM_PlayerPreThink"forward_FM_PlayerPreThink"0)
}

public 
plugin_precache()
{
    
spriteid precache_model("sprites/lgtning.spr")
}

public 
paint_handler(idlevelcid)
{
    if(!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED
    
    
if(!is_user_alive(id))
    {
        
client_print(idprint_chat"* You cannot use the magic marker when you are dead.")
        return 
PLUGIN_HANDLED
    
}
    
    static 
cmd[2]
    
read_argv(0cmd1)
    
    switch(
cmd[0])
    {
        case 
'+'is_drawing[id] = true
        
case '-'is_drawing[id] = false
    
}
    return 
PLUGIN_HANDLED
}

public 
forward_FM_PlayerPreThink(id)
{
    if(
prethink_counter[id]++ > 5)
    {
        if(
is_drawing[id] && !is_aiming_at_sky(id))
        {
            static 
Float:cur_origin[3], Float:distance

            cur_origin 
origin[id]
            
            if(!
is_holding[id])
            {
                
fm_get_aim_origin(idorigin[id])
                
move_toward_client(idorigin[id])
                
is_holding[id] = true
                
return FMRES_IGNORED
            
}
            
            
fm_get_aim_origin(idorigin[id])
            
move_toward_client(idorigin[id])
            
            
distance get_distance_f(origin[id], cur_origin)
            
            if(
distance 2)
            {
                
draw_line(origin[id], cur_origin)
            }
        }
        else
        {
            
is_holding[id] = false
        
}
        
prethink_counter[id] = 0
    
}
    
    return 
FMRES_IGNORED
}

stock draw_line(Float:origin1[3], Float:origin2[3])
{
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    
write_byte(TE_BEAMPOINTS)
    
engfunc(EngFunc_WriteCoordorigin1[0])
    
engfunc(EngFunc_WriteCoordorigin1[1])
    
engfunc(EngFunc_WriteCoordorigin1[2])
    
engfunc(EngFunc_WriteCoordorigin2[0])
    
engfunc(EngFunc_WriteCoordorigin2[1])
    
engfunc(EngFunc_WriteCoordorigin2[2])
    
write_short(spriteid)
    
write_byte(0)
    
write_byte(10)
    
write_byte(255)
    
write_byte(50)
    
write_byte(0)
    
write_byte(random(255))
    
write_byte(random(255))
    
write_byte(random(255))
    
write_byte(255)
    
write_byte(0)
    
message_end()
}

//from fakemeta_util.inc
stock fm_get_aim_origin(indexFloat:origin[3])
{
    static 
Float:start[3], Float:view_ofs[3]
    
pev(indexpev_originstart)
    
pev(indexpev_view_ofsview_ofs)
    
xs_vec_add(startview_ofsstart)
    
    static 
Float:dest[3]
    
pev(indexpev_v_angledest)
    
engfunc(EngFunc_MakeVectorsdest)
    
global_get(glb_v_forwarddest)
    
xs_vec_mul_scalar(dest9999.0dest)
    
xs_vec_add(startdestdest)
    
    
engfunc(EngFunc_TraceLinestartdest0index0)
    
get_tr2(0TR_vecEndPosorigin)
    
    return 
1
}

stock move_toward_client(idFloat:origin[3])
{        
    static 
Float:player_origin[3]
    
    
pev(idpev_originplayer_origin)
    
    
origin[0] += (player_origin[0] > origin[0]) ? 1.0 : -1.0
    origin
[1] += (player_origin[1] > origin[1]) ? 1.0 : -1.0
    origin
[2] += (player_origin[2] > origin[2]) ? 1.0 : -1.0
}
//Thanks AdaskoMX!
bool:is_aiming_at_sky(index)
{
    new 
Float:origin[3];
    
fm_get_aim_origin(indexorigin);

    return 
engfunc(EngFunc_PointContentsorigin) == CONTENTS_SKY;

Im newbie prog.


I add msg , if the player is not Simon

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <xs>

#define PLUGIN "Magic Marker"
#define VERSION "3.1"
#define AUTHOR "stupok69"

#define MAX_PLAYERS 32


#define USAGE_LEVEL g_iSimon

new Float:origin[MAX_PLAYERS+1][3]
new 
prethink_counter[MAX_PLAYERS+1]
new 
bool:is_drawing[MAX_PLAYERS+1]
new 
bool:is_holding[MAX_PLAYERS+1]

new 
spriteid

#if defined USE_SIMON 
new g_iSimon;
#endif




public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
#if defined USE_SIMON
    
g_iSimon g_iSimon
    register_clcmd
("+paint""paint_handler"USAGE_LEVEL"Paint on the walls!")
    
register_clcmd("-paint""paint_handler"USAGE_LEVEL"Paint on the walls!")
    
#endif
    
    
register_forward(FM_PlayerPreThink"forward_FM_PlayerPreThink"0)
}

public 
plugin_precache()
{
    
spriteid precache_model("sprites/lgtning.spr")
}

public 
paint_handler(idlevelcid)
{
    if(!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED
    
    
if(!is_user_alive(id))
    {
        
client_print(idprint_chat"* You cannot use the magic marker when you are dead.")
        return 
PLUGIN_HANDLED
    
}
#if defined USE_SIMON 
    
if( id != ( g_iSimon ) )
    {
        
ColorChatidNORMAL"%s You must be ^03Simon ^01to use this command."g_szPrefix );
        return 
PLUGIN_HANDLED;
    }
    
#endif
    
    
static cmd[2]
    
read_argv(0cmd1)
    
    switch(
cmd[0])
    {
        case 
'+'is_drawing[id] = true
        
case '-'is_drawing[id] = false
    
}
    return 
PLUGIN_HANDLED
}

public 
forward_FM_PlayerPreThink(id)
{
    if(
prethink_counter[id]++ > 5)
    {
        if(
is_drawing[id] && !is_aiming_at_sky(id))
        {
            static 
Float:cur_origin[3], Float:distance

            cur_origin 
origin[id]
            
            if(!
is_holding[id])
            {
                
fm_get_aim_origin(idorigin[id])
                
move_toward_client(idorigin[id])
                
is_holding[id] = true
                
return FMRES_IGNORED
            
}
            
            
fm_get_aim_origin(idorigin[id])
            
move_toward_client(idorigin[id])
            
            
distance get_distance_f(origin[id], cur_origin)
            
            if(
distance 2)
            {
                
draw_line(origin[id], cur_origin)
            }
        }
        else
        {
            
is_holding[id] = false
        
}
        
prethink_counter[id] = 0
    
}
    
    return 
FMRES_IGNORED
}

stock draw_line(Float:origin1[3], Float:origin2[3])
{
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    
write_byte(TE_BEAMPOINTS)
    
engfunc(EngFunc_WriteCoordorigin1[0])
    
engfunc(EngFunc_WriteCoordorigin1[1])
    
engfunc(EngFunc_WriteCoordorigin1[2])
    
engfunc(EngFunc_WriteCoordorigin2[0])
    
engfunc(EngFunc_WriteCoordorigin2[1])
    
engfunc(EngFunc_WriteCoordorigin2[2])
    
write_short(spriteid)
    
write_byte(0)
    
write_byte(10)
    
write_byte(255)
    
write_byte(50)
    
write_byte(0)
    
write_byte(random(255))
    
write_byte(random(255))
    
write_byte(random(255))
    
write_byte(255)
    
write_byte(0)
    
message_end()
}

//from fakemeta_util.inc
stock fm_get_aim_origin(indexFloat:origin[3])
{
    static 
Float:start[3], Float:view_ofs[3]
    
pev(indexpev_originstart)
    
pev(indexpev_view_ofsview_ofs)
    
xs_vec_add(startview_ofsstart)
    
    static 
Float:dest[3]
    
pev(indexpev_v_angledest)
    
engfunc(EngFunc_MakeVectorsdest)
    
global_get(glb_v_forwarddest)
    
xs_vec_mul_scalar(dest9999.0dest)
    
xs_vec_add(startdestdest)
    
    
engfunc(EngFunc_TraceLinestartdest0index0)
    
get_tr2(0TR_vecEndPosorigin)
    
    return 
1
}

stock move_toward_client(idFloat:origin[3])
{        
    static 
Float:player_origin[3]
    
    
pev(idpev_originplayer_origin)
    
    
origin[0] += (player_origin[0] > origin[0]) ? 1.0 : -1.0
    origin
[1] += (player_origin[1] > origin[1]) ? 1.0 : -1.0
    origin
[2] += (player_origin[2] > origin[2]) ? 1.0 : -1.0
}
//Thanks AdaskoMX!
bool:is_aiming_at_sky(index)
{
    new 
Float:origin[3];
    
fm_get_aim_origin(indexorigin);

    return 
engfunc(EngFunc_PointContentsorigin) == CONTENTS_SKY;

Oh my god, dude seriously, can you please get a decent knowledge before helping ppl, like look at this, you didn't even include colorchat for the plugin, and you never even notified the guy that the plugin is using colorchat, and you didn't even define g_szprefix, and you didn't even make a way for the player to get simon, just stop trying to help people please.
__________________

Last edited by crnova; 02-23-2016 at 17:39.
crnova is offline
JoaoVieira
Senior Member
Join Date: May 2013
Location: Portugal
Old 02-22-2016 , 18:51   Re: [HELP ] editing script :)
Reply With Quote #15

I was mading this for my server , i just forgot to add and remove few things... But if that gave him some error and he didnt reclaim for it maybe he fixed it...

Last edited by JoaoVieira; 02-22-2016 at 18:51.
JoaoVieira is offline
bilel_ghost
Junior Member
Join Date: Jan 2016
Old 02-25-2016 , 05:03   Re: [HELP ] editing script :)
Reply With Quote #16

Tw tchidli zebiii
O t3rf mnin tchid 3d
bilel_ghost is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 02-25-2016 , 08:50   Re: [HELP ] editing script :)
Reply With Quote #17

3d ? hhhhhhhhhhhhhhhhhhh mala jabri mazelt tseb bil msget ? lol 9a3do ken idherri lma7gourin wfrou5 lecran
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
bilel_ghost
Junior Member
Join Date: Jan 2016
Old 02-25-2016 , 13:20   Re: [HELP ] editing script :)
Reply With Quote #18

Hhhhhhhh hetha inti t9oul fiha @.@ inti ta7ki éla frou5 l'ecran
Wras 5ouya kan tji 9odemi mate5ouch mini 2mn
bilel_ghost is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 02-26-2016 , 02:43   Re: [HELP ] editing script :)
Reply With Quote #19

English only here!
__________________

Mordekay is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 02-26-2016 , 20:56   Re: [HELP ] editing script :)
Reply With Quote #20

Quote:
Originally Posted by bilel_ghost View Post
Hhhhhhhh hetha inti t9oul fiha @.@ inti ta7ki éla frou5 l'ecran
Wras 5ouya kan tji 9odemi mate5ouch mini 2mn
First I'm Not Your Brother. Second you're just a such liar kid. go play away kid you're not my lvl i have no time for this bullshit...
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !

Last edited by Old.School; 02-26-2016 at 21:59.
Old.School is offline
Reply



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 05:12.


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