Raised This Month: $ Target: $400
 0% 

Help me plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alex4301
Junior Member
Join Date: Sep 2012
Old 12-15-2015 , 12:39   Help me plugin
Reply With Quote #1

Quote:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN ""
#define VERSION "1.0"
#define AUTHOR ""

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

set_task(3000, "slapon3000", id, "", 0, "a", 50)
}
public slapon3000(id)
{

New name[32]
Get_user_name(id,name,31)
server_cmd(amx_slap %d",nume)

}
what is wrong... ?

Last edited by alex4301; 12-15-2015 at 12:39.
alex4301 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-15-2015 , 13:07   Re: Help me plugin
Reply With Quote #2

This is wrong ( market with the red )
You want to call a task on a person, in a function that is not called on a person, but when the plugin is loaded
What are you trying to do exactly?

Code:
public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)

set_task(3000, "slapon3000", id, "", 0, "a", 50)    
}
__________________
Depresie is offline
alex4301
Junior Member
Join Date: Sep 2012
Old 12-15-2015 , 13:21   Re: Help me plugin
Reply With Quote #3

You can fix this plugin? please

Last edited by alex4301; 12-15-2015 at 13:22.
alex4301 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-15-2015 , 13:26   Re: Help me plugin
Reply With Quote #4

if you tell me what it is supposed to do...
__________________
Depresie is offline
alex4301
Junior Member
Join Date: Sep 2012
Old 12-15-2015 , 13:39   Re: Help me plugin
Reply With Quote #5

must give everyone the player to execute the command every 3,000 seconds.
alex4301 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-15-2015 , 14:01   Re: Help me plugin
Reply With Quote #6

so you want to execute a command on all players at the same time every 3000 seconds?
__________________

Last edited by Depresie; 12-15-2015 at 14:01.
Depresie is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2015 , 14:30   Re: Help me plugin
Reply With Quote #7

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


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 18:16.


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