Raised This Month: $ Target: $400
 0% 

Help me plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2015 , 14:30   Re: Help me plugin
Reply With Quote #1

Why use server_cmd with slap? Use user_slap with id. Your plugin will not always work like that.

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

#define TASK_SLAP 545543
#define TIME_SLAP 3000.0

public plugin_init()
    
register_plugin("Auto Slap on X Seconds""1.0""OciXCrom")

public 
client_putinserver(id)
{
    new 
TASK TASK_SLAP id
    
if(task_exists(TASK)) remove_task(TASK)
    
set_task(TIME_SLAP"slapEveryone"TASK__"b")
}

public 
slapEveryone(TASK)
{
    new 
id TASK TASK_SLAP
    user_slap
(id0)


Last edited by OciXCrom; 12-15-2015 at 14:35.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 18:16.


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