Raised This Month: $32 Target: $400
 8% 

Plugin Register


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lantimilan
Senior Member
Join Date: May 2016
Old 12-01-2017 , 07:46   Plugin Register
Reply With Quote #1

Hello i download one plugin but he not have author how to set i try to set with define but not read in server , can you set in .sma

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <hamsandwich> 
#include <fakemeta> 
#include <colorchat>

#define TIME 30.0 

new Float:player_origin[33][3]; 

public 
plugin_init(){ 
    
RegisterHam(Ham_Spawn"player""e_Spawn"1); 

  
public 
e_Spawn(id

    
remove_task(id
    if(
is_user_alive(id)) 
    { 
        
set_task(0.8"get_spawn"id); 
    } 
    return 
HAM_IGNORED


public 
get_spawn(id

    
pev(idpev_originplayer_origin[id]); 
    
set_task(TIME"check_afk"id); 

  
public 
check_afk(id

    if(
is_user_alive(id)) 
    { 
        if(
same_origin(id)) 
        { 
            
user_kill(id); 
            new 
name[33]; 
            
get_user_name(idname32); 
            
ColorChat(0GREEN"^3[^4AFK Slay^3]^4: %s ^3eshte vrare per shkak te qendrimit ne ^4AFK."name); 
        } 
    } 

  
public 
same_origin(id

    new 
Float:origin[3]; 
    
pev(idpev_originorigin); 
    for(new 
03i++) 
        if(
origin[i] != player_origin[id][i]) 
            return 
0
    return 
1

lantimilan is offline
Send a message via MSN to lantimilan
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-01-2017 , 07:48   Re: Plugin Register
Reply With Quote #2

In plugin_init(), just above the RegisterHam(...) line, add
PHP Code:
register_plugin("Plugin Name""Version""Author");
// Example:
register_plugin("Check AFK""1.0.0""AlliedModders"); 
klippy is offline
lantimilan
Senior Member
Join Date: May 2016
Old 12-01-2017 , 07:59   Re: Plugin Register
Reply With Quote #3

This plugin its is okey klippy what do you think ?
lantimilan is offline
Send a message via MSN to lantimilan
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 12-01-2017 , 11:17   Re: Plugin Register
Reply With Quote #4

Quote:
Originally Posted by lantimilan View Post
This plugin its is okey klippy what do you think ?
Its a simple afk manager based on checking the position of the player, if the player hasnt moved in 30 seconds he will be killed.
__________________
And I Am Back.
TheSpaniard is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 12-01-2017 , 11:22   Re: Plugin Register
Reply With Quote #5

Quote:
Originally Posted by TheSpaniard View Post
Its a simple afk manager based on checking the position of the player, if the player hasnt moved in 30 seconds he will be killed.
he asked whether that plugin is good to use, in other words "efficient"
__________________
retired chump
DjSoftero is offline
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 12-01-2017 , 11:28   Re: Plugin Register
Reply With Quote #6

Quote:
Originally Posted by DjSoftero View Post
he asked whether that plugin is good to use, in other words "efficient"
lol how do you decode the fcking un-understandable english, Really.
__________________
And I Am Back.
TheSpaniard 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 03:23.


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