Raised This Month: $ Target: $400
 0% 

Needing help....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rikards1
Member
Join Date: Aug 2009
Old 10-25-2009 , 10:36   Needing help....
Reply With Quote #1

Hi! Can some1 tell my why i get like 9 errors of this?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <cstrike>
#include <fakemeta>
#define PLUGIN "admin_power"
#define VERSION "1.0"
#define AUTHOR "Rikards1"
#define BM_ADMIN_LEVEL ADMIN_MENU //admin access level to use this plugin. ADMIN_MENU = flag 'u'
// global booleans
new bool:gbAdminGodmode[33];
new 
bool:gbAdminNoclip[33];
/***** PLUGIN START *****/
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR);
 
register_cvar(PLUGINVERSIONFCVAR_SERVER0.0);
 
 
//register client commands
 
register_clcmd("say /ap""showMainMenu");
 
 
//register forwards
 
register_forward(FM_EmitSound"forward_EmitSound");
 
 
//register events
 
register_event("DeathMsg""eventPlayerDeath""a");
 
register_event("TextMsg""eventRoundRestart""a""2&#Game_C""2&#Game_w");
 
register_event("ResetHUD""eventPlayerSpawn""b");
 
register_event("CurWeapon""eventCurWeapon""be");
 
register_logevent("eventRoundRestart"2"1=Round_Start");
 
 
//make save folder in basedir (new saving/loading method)
 
new szDir[64];
 new 
szMap[32];
 
get_basedir(szDir64);
 
add(szDir64"/adminpower");
 
 
//make config folder if it doesn't already exist
 
if (!dir_exists(szDir))
 {
  
mkdir(szDir);
 }
 
}
 
//creat main menu
 
new size sizeof(gszMainMenu);
 
add(gszMainMenusize"\yAdmin Power^n^n");
 
add(gszMainMenusize"\r1. %sNoclip: %s^n");
 
add(gszMainMenusize"\r2. %sGodmode: %s^n^n^n");
 
add(gszMainMenusize"\r0. \wClose");
 
gKeysMainMenu B1 B2 B0;
/***** FORWARDS *****/
public client_connect(id)
{
 
//player doesn't have godmode or noclip
 
gbAdminGodmode[id] = false;
 
gbAdminNoclip[id] = false;
}
public 
client_disconnect(id)
{
}
/***** EVENTS *****/
public eventPlayerDeath()
{
 new 
id read_data(2);
}
public 
eventRoundRestart()
{
 
//iterate through all players
 
for (new id 1id <= 32; ++id)
 {
  
//reset all players timers
  
resetTimers(id);
 }
}
public 
eventPlayrSpawn(id)
{
 
//if player has godmode enabled
 
if (gbAdminGodmode[id])
 {
  
//re-enable godmode on player
  
set_user_godmode(id1);
 }
 
 
//if player has noclip enabled
 
if (gbAdminNoclip[id])
 {
  
//re-enable noclip on player
  
set_user_noclip(id1);
 }
}
/* MENUS */
public showMainMenu(id)
{
 new 
col[3];
 new 
szMenu[256];
 new 
szGodmode[6];
 new 
szNoclip[6];
 
col = (get_user_flags(id) & BM_ADMIN_LEVEL "\w" "\d");
 
szNoclip = (get_user_noclip(id) ? "\yOn" "\rOff");
 
szGodmode = (get_user_godmode(id) ? "\yOn" "\rOff");
 
 
//format the main menu
 
format(szMenu256gszMainMenucolszNoclipcolszGodmode);
 
 
//show the main menu to the player
 
show_menu(idgKeysMainMenuszMenu, -1"bmMainMenu");
 
 return 
PLUGIN_HANDLED;
}
showBlockMenu(id)
{
 new 
col[3];
 new 
szMenu[256];
 new 
szGodmode[6];
 new 
szNoclip[6];
 new 
szSize[8];
 
col = (get_user_flags(id) & BM_ADMIN_LEVEL "\w" "\d");
 
szNoclip = (get_user_noclip(id) ? "\yOn" "\rOff");
 
szGodmode = (get_user_godmode(id) ? "\yOn" "\rOff");
 
 
//format the main menu
 
format(szMenu256gszBlockMenugszBlockNames[gSelectedBlockType[id]], colcolcolcolcolszNoclipcolszGodmode);
 
 
//show the block menu to the player
 
show_menu(idgKeysBlockMenuszMenu, -1"bmBlockMenu");
 
 return 
PLUGIN_HANDLED;
}
public 
handleMainMenu(idnum)
{
 switch (
num)
 {
  case 
N1: { toggleNoclip(id); }
  case 
N2: { toggleGodmode(id); }
  case 
N0: { return; }
 }
 
}
toggleGodmode(id)
{
 
//make sure player has access to this command
 
if (get_user_flags(id) & BM_ADMIN_LEVEL)
 {
  
//if player has godmode
  
if (get_user_godmode(id))
  {
   
//turn off godmode for player
   
set_user_godmode(id0);
   
gbAdminGodmode[id] = false;
  }
  else
  {
   
//turn on godmode for player
   
set_user_godmode(id1);
   
gbAdminGodmode[id] = true;
  }
 }
}
toggleNoclip(id)
{
 
//make sure player has access to this command
 
if (get_user_flags(id) & BM_ADMIN_LEVEL)
 {
  
//if player has noclip
  
if (get_user_noclip(id))
  {
   
//turn off noclip for player
   
set_user_noclip(id0);
   
gbAdminNoclip[id] = false;
  }
  else
  {
   
//turn on noclip for player
   
set_user_noclip(id1);
   
gbAdminNoclip[id] = true;
  }
 }

rikards1 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 10:40   Re: Needing help....
Reply With Quote #2

Because you have copy-paste some code and put them together and you get a nice shit. Basically you don't know what you are doing.
__________________
Arkshine is offline
rikards1
Member
Join Date: Aug 2009
Old 10-25-2009 , 11:29   Re: Needing help....
Reply With Quote #3

Hehe..... but.. who cares fuck it then
rikards1 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 11:40   Re: Needing help....
Reply With Quote #4

You better request in the right section that you want to put some plugins together and providing the plugins.
__________________
Arkshine is offline
rikards1
Member
Join Date: Aug 2009
Old 10-25-2009 , 13:00   Re: Needing help....
Reply With Quote #5

okey
rikards1 is offline
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 17:37.


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