Raised This Month: $ Target: $400
 0% 

Trying to write an include File...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 09-30-2006 , 11:24   Trying to write an include File...
Reply With Quote #1

First of all, I started with a simple Plugin like this (which has no Bugs):
Code:
#include <amxmodx> #include <amxmisc> #include <fun_shortcuts> #define VERSION "1.0" public plugin_init() {     register_plugin("Screen Flash",VERSION,"Silencer")     register_concmd("amx_flash","flash",ADMIN_BAN,"Playername Duration Holdtime Fadetype Red Green Blue Alpha - Flash a Player") } public flash(id,level,cid) {     if(!cmd_access(id,ADMIN_BAN,cid,9))     {         return PLUGIN_HANDLED     }         new arg[32]     read_argv(1,arg,31)     new target=cmd_target(1,arg,11)         if(!target)     {         return PLUGIN_HANDLED     }         new dp[16]     read_argv(2,dp,15)     new Float:d=str_to_float(dp)         new hp[16]     read_argv(3,hp,15)     new Float:h=str_to_float(hp)         new fp[16]     read_argv(4,fp,15)     new f=str_to_num(fp)         new rp[16]     read_argv(5,rp,15)     new r=str_to_num(rp)         new gp[16]     read_argv(6,gp,15)     new g=str_to_num(gp)         new bp[16]     read_argv(7,bp,15)     new b=str_to_num(bp)         new ap[16]     read_argv(8,ap,15)     new a=str_to_num(ap)         set_user_screen_flash(target,d,h,f,r,g,b,a)         return PLUGIN_HANDLED }
You see 'set_user_screen_flash(target,d,h,f,r,g,b,a)' , which does not exist.
So I made a new Include-File called 'fun_shortcuts.inc'. But when compiling I get this Error:
Start of Function Body without Function Header.
Please Help me! Here is the include File:
Code:
/* Fun Shortcuts by Silencer ** This file is provided as is (no warranties). */ #if !defined _fun_shortcuts_included     #define _shortcuts_included #if !defined _amxmodx_included     #include <amxmodx.inc> #endif /* Flash Screen */ native set_user_screen_flash(index = 0, Float:duration = 2.5, Float:holdtime = 0.5, fadetype = 0, red = 255, green = 255, blue = 255, alpha = 255); {     message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},index);     write_byte(duration);     write_byte(holdtime);     write_byte(fadetype);     write_byte(red);     write_byte(green);     write_byte(blue);     write_byte(alpha);     message_end(); }
__________________
EAT YOUR VEGGIES

Last edited by Silencer123; 09-30-2006 at 11:28.
Silencer123 is offline
 


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 04:46.


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