Raised This Month: $ Target: $400
 0% 

Example Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-16-2011 , 10:20   Example Plugin
Reply With Quote #1

Hi, because this plugin not compiling? And this example is correct?

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

public plugin_init()

    
register_plugin("Example Plugin""0.1""")
}

public 
client_disconnect(id)
{
   new 
name[32], steamid[32]
   
   
get_user_name(idname31)
   
get_user_authid(idsteamid31)
   
   
set_task(30.1"Example"namesteam)
}

public 
Example(name[], steamid[])
{
  
server_print("SteamID: ^"%s^""steamid)
  
server_print("Name: ^"%s^""name)

__________________
kramesa is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 11-16-2011 , 10:32   Re: Example Plugin
Reply With Quote #2

I found the error, look find the red colored leter here

Code:
        register_plugin("Example PLugin", "0.1", "")
__________________

Last edited by Snaker beatter; 11-16-2011 at 10:32.
Snaker beatter is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-16-2011 , 10:33   Re: Example Plugin
Reply With Quote #3

Quote:
Originally Posted by Snaker beatter View Post
I found the error, look find the red colored leter here

Code:
        register_plugin("Example PLugin", "0.1", "")
Lol?
__________________
kramesa is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 11-16-2011 , 10:40   Re: Example Plugin
Reply With Quote #4

"" using this parameter will cause error to compile
__________________
Snaker beatter is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 11-16-2011 , 10:48   Re: Example Plugin
Reply With Quote #5

The problem is this:
PHP Code:
set_task(30.1"Example"namesteam
If you would have read the compiling error and searched or checked the funcwiki, you would have learned that those params don't match the ones expected by set_task.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-16-2011 , 11:04   Re: Example Plugin
Reply With Quote #6

Quote:
Originally Posted by drekes View Post
The problem is this:
PHP Code:
set_task(30.1"Example"namesteam
If you would have read the compiling error and searched or checked the funcwiki, you would have learned that those params don't match the ones expected by set_task.
But, how i get the steam id and the name, of the client_disconnect?
__________________

Last edited by kramesa; 11-16-2011 at 11:05.
kramesa is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 11-16-2011 , 11:25   Re: Example Plugin
Reply With Quote #7

The steamid & name should work.
Like i said before, search about setting tasks. There's a tutorial for it.
Also the funcwiki explains how you should do it. Stop being lazy.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-16-2011 , 11:27   Re: Example Plugin
Reply With Quote #8

Quote:
Originally Posted by drekes View Post
The steamid & name should work.
Like i said before, search about setting tasks. There's a tutorial for it.
Also the funcwiki explains how you should do it. Stop being lazy.
Hahaha, ok, thanks
__________________
kramesa 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 08:28.


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