Raised This Month: $ Target: $400
 0% 

my first plugin help plz i coded my self


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
newbie1233
BANNED
Join Date: Jul 2006
Old 09-07-2006 , 13:50   my first plugin help plz i coded my self
Reply With Quote #1

When i use my plugin it wont work or on connect it wont go in server why

Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>

public plugin_init(){
    register_plugin("Flash light","0.2","Newbie")
    register_concmd("amx_light","admin_light",ADMIN_LEVEL_A,"<authid, nick, @team or #userid> set user flash light on off on off")
}
public toggle_light(id,level,cid){
    if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
    client_cmd(id, "impulse 100")
    client_cmd(id, "stop")
    client_cmd(id, "impulse 100")
    return PLUGIN_HANDLED
}
Attached Files
File Type: sma Get Plugin or Get Source (flashlight.sma - 620 views - 489 Bytes)
newbie1233 is offline
kirby7wu
Member
Join Date: Jun 2005
Location: Кры
Old 09-07-2006 , 15:45   Re: my first plugin help plz i coded my self
Reply With Quote #2

Code:
public toggle_light(id,level,cid){
Shouldn't this be:

Code:
public admin_light(id,level,cid){
__________________
Please do not give me any karma, I do not participate in that.
kirby7wu is offline
Send a message via AIM to kirby7wu
hmrsmpsn
Senior Member
Join Date: Nov 2005
Location: sWeDeN YEEAAAH!!!
Old 09-07-2006 , 15:58   Re: my first plugin help plz i coded my self
Reply With Quote #3

your are sooooo right!
__________________



new Float:second = 1.0
new Float:minute = 60*second
new Float:hour = 60*minute
new Float:day = 24*hour
new Float:year = 365*day
set_task(10.0*years,"clean_my_room")
hmrsmpsn is offline
newbie1233
BANNED
Join Date: Jul 2006
Old 09-07-2006 , 16:10   Re: my first plugin help plz i coded my self
Reply With Quote #4

yes now when i am in game its not there on list when i need amx_light
newbie1233 is offline
kirby7wu
Member
Join Date: Jun 2005
Location: Кры
Old 09-07-2006 , 17:02   Re: my first plugin help plz i coded my self
Reply With Quote #5

Quote:
Originally Posted by newbie1233 View Post
yes now when i am in game its not there on list when i need amx_light
Register it with plugins.ini
__________________
Please do not give me any karma, I do not participate in that.
kirby7wu is offline
Send a message via AIM to kirby7wu
newbie1233
BANNED
Join Date: Jul 2006
Old 09-08-2006 , 04:08   Re: my first plugin help plz i coded my self
Reply With Quote #6

i did and it says not viewing a demo when i put amx_light cube
newbie1233 is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 09-08-2006 , 04:23   Re: my first plugin help plz i coded my self
Reply With Quote #7

Quote:
it says not viewing a demo
Because you shouldn't execute "stop" when it's not needed
Quote:
client_cmd(id, "stop")
VEN is offline
newbie1233
BANNED
Join Date: Jul 2006
Old 09-08-2006 , 05:18   Re: my first plugin help plz i coded my self
Reply With Quote #8

Thx + karma to peaple who helped me in this forum bit
newbie1233 is offline
newbie1233
BANNED
Join Date: Jul 2006
Old 09-08-2006 , 05:22   Re: my first plugin help plz i coded my self
Reply With Quote #9

here it is if anyone wants it
Attached Files
File Type: sma Get Plugin or Get Source (flashlight.sma - 629 views - 627 Bytes)
newbie1233 is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 09-08-2006 , 05:33   Re: my first plugin help plz i coded my self
Reply With Quote #10

Is this a plugin like for a crazy man with a stucked flashlight on/off button? :o
VEN 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 00:50.


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