Mine sisusse
Otsi siit
  • Rohkem valikuid...
Otsi tulemusi mis sisaldab...
Otsi tulemusi...

amxmodx scriptimise viga

Soovitatud postitused

Olge head ja aidake leida viga..

#include  #include 
#include 
#include 


#define PLUGIN "JB VIPPlugin"
#define VERSION "1.0"
#define AUTHOR "keegi"


new bool:has_used[33] 


public plugin_init() 
{ 
   register_clcmd( "say /vipmenu", "VIPMenu" ); 
   register_clcmd( "say_team /vipmenu", "VIPMenu" ); 


   register_logevent("event_new_round", 2, "1=Round_Start") 
} 


public VIPMenu( id ) 
{ 
   if(!has_used[id]) 
   { 
       if(get_user_flags(id) & ADMIN_LEVEL_H) 
       { 
           new vip_menu = menu_create( "\VIP Menu", "menu_handler" ); 
           menu_additem( vip_menu, "\125 HP", "1", 0 ); 
           menu_additem( vip_menu, "\Granaadid", "2", 0 ); 
           menu_additem( vip_menu, "\Gravity", "3", 0); 
           menu_additem( vip_menu, "\Kiirus", "4", 0); 
           menu_additem( vip_menu, "\Kilp", "5", 0);  

           menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL ); 
           menu_display( id, vip_menu, 0 ); 
       } 
       else 
       { 
           client_print(id, print_chat, "[JAILBREAK] Ainult VIPid saavad kasutada VIP menu.") 
       } 
   } 
   else 
   { 
       client_print(id, print_chat, "[JAILBREAK] Sa juba kasutasid VIP menu see round.") 
   } 
} 


public menu_handler( id, menu, item ) 
{ 
   if( item == MENU_EXIT ) 
   { 
       menu_destroy( menu ); 
       return PLUGIN_HANDLED; 
   } 
   new data[6], iName[64]; 
   new access, callback; 

   menu_item_getinfo( menu, item, access, data,5, iName, 63, callback ); 
   new key = str_to_num( data ); 
   switch( key ) 
   { 
       case 1: 
       { 
           if( is_user_alive( id ) ) 
           { 
               set_user_health( id, 255 ); //Sets health of id to 150 
           } 
       } 
       case 2: 
       { 
           if( is_user_alive( id ) ) 
           { 
               give_item( id, "weapon_hegrenade" )
               give_item( id, "weapon_flashbang" )
               give_item( id, "weapon_flashbang" )
               give_item( id, "weapon_smokegrenade" )
           } 
       } 
       case 3: 
       { 
           if( is_user_alive( id ) ) 
           { 
               set_user_gravity( id, 0.5 ); 
           } 
       } 
       case 4: 
       { 
           if(is_user_alive(id)) 
           { 
               set_user_maxspeed(id,420);
           }     
       }    

        case 5: 
       { 
           if(is_user_alive(id)) 
           { 
               give_item( id, "weapon_shield" );
           }     
       }    

   has_used[id] = true; 
   menu_destroy( menu ); 
   return PLUGIN_HANDLED; 
} 



public event_new_round() 
   arrayset(has_used, false, 33)

 

compilimisel viskab erroreid:

 

/tmp/textfUxajQ.sma(89) : warning 213: tag mismatch/tmp/textfUxajQ.sma(101) : error 002: only a single statement (or expression) can follow each "case"
/tmp/textfUxajQ.sma(101) : error 029: invalid expression, assumed zero
/tmp/textfUxajQ.sma(101) : warning 215: expression has no effect
/tmp/textfUxajQ.sma(101) : error 001: expected token: ";", but found "]"
/tmp/textfUxajQ.sma(101) : fatal error 107: too many error messages on one line


Compilation aborted.
4 Errors.


 

ette tänades,

Joonas

Jaga seda postitust


Postituse link
Share on other sites

#include 
#include 
#include 
#include 


#define PLUGIN "JB VIPPlugin"
#define VERSION "1.0"
#define AUTHOR "keegi"


new bool:has_used[33] 


public plugin_init() 
{ 
register_clcmd( "say /vipmenu", "VIPMenu" ); 
register_clcmd( "say_team /vipmenu", "VIPMenu" ); 


register_logevent("event_new_round", 2, "1=Round_Start") 
} 


public VIPMenu( id ) 
{ 
if(!has_used[id]) 
{ 
	if(get_user_flags(id) & ADMIN_LEVEL_H) 
	{ 
		new vip_menu = menu_create( "\VIP Menu", "menu_handler" ); 
		menu_additem( vip_menu, "\125 HP", "1", 0 ); 
		menu_additem( vip_menu, "\Granaadid", "2", 0 ); 
		menu_additem( vip_menu, "\Gravity", "3", 0); 
		menu_additem( vip_menu, "\Kiirus", "4", 0); 
		menu_additem( vip_menu, "\Kilp", "5", 0);  

		menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL ); 
		menu_display( id, vip_menu, 0 ); 
	} 
	else 
	{ 
		client_print(id, print_chat, "[JAILBREAK] Ainult VIPid saavad kasutada VIP menu.") 
	} 
} 
else 
{ 
	client_print(id, print_chat, "[JAILBREAK] Sa juba kasutasid VIP menu see round.") 
} 
} 


public menu_handler( id, menu, item ) 
{
if( item == MENU_EXIT ) 
{ 
	menu_destroy( menu ); 
	return PLUGIN_HANDLED; 
} 
new data[6], iName[64]; 
new access, callback; 

menu_item_getinfo( menu, item, access, data,5, iName, 63, callback ); 
new key = str_to_num( data ); 
switch( key ) 
{
	case 1: 
	{ 
		if( is_user_alive( id ) ) 
		{ 
			set_user_health( id, 255 ); //Sets health of id to 150 
		} 
	} 
	case 2: 
	{ 
		if( is_user_alive( id ) ) 
		{ 
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
		} 
	} 
	case 3: 
	{ 
		if( is_user_alive( id ) ) 
		{ 
			set_user_gravity( id, 0.5 ); 
		} 
	} 
	case 4: 
	{ 
		if(is_user_alive(id)) 
		{ 
			set_user_maxspeed(id, 420.0);
		}     
	}    

	case 5: 
	{ 
		if(is_user_alive(id)) 
		{ 
			give_item( id, "weapon_shield" );
		}     
	}
}

has_used[id] = true;
menu_destroy( menu );

return PLUGIN_HANDLED;
}


public event_new_round() 
arrayset(has_used, false, 33)

http://www.upload.ee/files/2443040/crapster.amxx.html

http://www.upload.ee/files/2443041/crapster.sma.html

 

;)


Veebiprogrammeerija & kujundaja

Jaga seda postitust


Postituse link
Share on other sites
VIP

Kood on kole, aga peaks töötama.

 

#include 
#include 
#include 
#include 
#pragma semicolon 1

new bool:has_used[33];
new bool:speedenabled[33];
new Float:vip_speed=420.0;
new Float:normal_speed=250.0;
new gmaxplayers;

public plugin_init() { 
register_plugin("Plugin","1.0b","Nobody");
register_clcmd("say /vipmenu","VIPMenu" );
register_clcmd("say_team /vipmenu","VIPMenu"); 
register_logevent("event_new_round",2,"1=Round_Start");
register_event("CurWeapon","Event_CurWeapon", "be","1=1");
gmaxplayers = get_maxplayers();
} 

public Event_CurWeapon(id) {
if(!is_user_alive(id)) {
	return PLUGIN_CONTINUE;
}

if((get_user_flags(id)&ADMIN_LEVEL_H)&&speedenabled[id]) {
	set_user_maxspeed(id,vip_speed);
	return PLUGIN_CONTINUE;
}
return PLUGIN_CONTINUE;
}

public VIPMenu(id) { 
if(!has_used[id]) { 
	if(get_user_flags(id)&ADMIN_LEVEL_H) {
		new vip_menu=menu_create("\VIP Menu","menu_handler");
		menu_additem(vip_menu,"\125 HP", "1",0);
		menu_additem(vip_menu,"\Granaadid","2",0);
		menu_additem(vip_menu,"\Gravity","3",0);
		menu_additem(vip_menu,"\Kiirus","4",0);
		menu_additem(vip_menu,"\Kilp","5",0);
		menu_setprop(vip_menu,MPROP_EXIT,MEXIT_ALL);
		menu_display(id,vip_menu,0);
	} else { 
		client_print(id,print_chat,"[JAILBREAK] Ainult VIPid saavad kasutada VIP menu.");
	} 
} else { 
	client_print(id,print_chat,"[JAILBREAK] Sa juba kasutasid VIP menu see round.");
} 
} 

public menu_handler(id,menu,item) {
if(item==MENU_EXIT) { 
	menu_destroy(menu);
	return PLUGIN_HANDLED;
} 
new data[6],iName[64];
new access,callback;
menu_item_getinfo(menu,item,access,data,5,iName,63,callback);
new key = str_to_num(data);
switch(key)
{
	case 1: { 
		if(is_user_alive(id)) { 
			set_user_health(id,255); 
		} 
	} 
	case 2: { 
		if(is_user_alive(id)) { 
			give_item(id,"weapon_hegrenade");
			give_item(id,"weapon_flashbang");
			give_item(id,"weapon_flashbang");
			give_item(id,"weapon_smokegrenade");
		} 
	} 
	case 3: { 
		if(is_user_alive(id)) { 
			set_user_gravity(id,0.5); 
		} 
	} 
	case 4: { 
		if(is_user_alive(id)) { 
			set_user_maxspeed(id,vip_speed);
		}     
	}    
	case 5: { 
		if(is_user_alive(id)) { 
			give_item(id,"weapon_shield");
		}     
	}
}
has_used[id]=true;
menu_destroy(menu);
return PLUGIN_HANDLED;
}

public event_new_round() {
arrayset(has_used,false,33);
arrayset(speedenabled,false,33);
for(new i=0;i		set_user_maxspeed(i,normal_speed);
}
}


pic.php?id=9Skype triple.-

Jaga seda postitust


Postituse link
Share on other sites
VIP

Seal scopega relva kuskilt vist ei saa, kui mapi pealt.. :D Ja kui saabki, siis relvavahetus ja speed on tagasi :D.


pic.php?id=9Skype triple.-

Jaga seda postitust


Postituse link
Share on other sites
VIP

Ma panin ka selle oma jailbreakile.

Aga tahaks teada kuhu see php kood läheb?


põhja-korea

Jaga seda postitust


Postituse link
Share on other sites
SUPERVIP
#include 
#include 
#include 
#include 


#define PLUGIN "JB VIPPlugin"
#define VERSION "1.0"
#define AUTHOR "keegi"


new bool:has_used[33] 


public plugin_init() 
{ 
   register_clcmd( "say /vipmenu", "VIPMenu" ); 
   register_clcmd( "say_team /vipmenu", "VIPMenu" ); 


   register_logevent("event_new_round", 2, "1=Round_Start") 
} 


public VIPMenu( id ) 
{ 
   if(!has_used[id]) 
   { 
       if(get_user_flags(id) & ADMIN_LEVEL_H) 
       { 
           new vip_menu = menu_create( "\VIP Menu", "menu_handler" ); 
           menu_additem( vip_menu, "\125 HP", "1", 0 ); 
           menu_additem( vip_menu, "\Granaadid", "2", 0 ); 
           menu_additem( vip_menu, "\Gravity", "3", 0); 
           menu_additem( vip_menu, "\Kiirus", "4", 0); 
           menu_additem( vip_menu, "\Kilp", "5", 0);  

           menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL ); 
           menu_display( id, vip_menu, 0 ); 
       } 
       else 
       { 
           client_print(id, print_chat, "[JAILBREAK] Ainult VIPid saavad kasutada VIP menu.") 
       } 
   } 
   else 
   { 
       client_print(id, print_chat, "[JAILBREAK] Sa juba kasutasid VIP menu see round.") 
   } 
} 


public menu_handler( id, menu, item ) 
{
   if( item == MENU_EXIT ) 
   { 
       menu_destroy( menu ); 
       return PLUGIN_HANDLED; 
   } 
   new data[6], iName[64]; 
   new access, callback; 

   menu_item_getinfo( menu, item, access, data,5, iName, 63, callback ); 
   new key = str_to_num( data ); 
   switch( key ) 
   {
       case 1: 
       { 
           if( is_user_alive( id ) ) 
           { 
               set_user_health( id, 255 ); //Sets health of id to 150 
           } 
       } 
       case 2: 
       { 
           if( is_user_alive( id ) ) 
           { 
               give_item( id, "weapon_hegrenade" )
               give_item( id, "weapon_flashbang" )
               give_item( id, "weapon_flashbang" )
               give_item( id, "weapon_smokegrenade" )
           } 
       } 
       case 3: 
       { 
           if( is_user_alive( id ) ) 
           { 
               set_user_gravity( id, 0.5 ); 
           } 
       } 
       case 4: 
       { 
           if(is_user_alive(id)) 
           { 
               set_user_maxspeed(id, 420.0);
           }     
       }    

       case 5: 
       { 
           if(is_user_alive(id)) 
           { 
               give_item( id, "weapon_shield" );
           }     
       }
   }

   has_used[id] = true;
   menu_destroy( menu );

   return PLUGIN_HANDLED;
}


public event_new_round() 
   arrayset(has_used, false, 33)

http://www.upload.ee/files/2443040/crapster.amxx.html

http://www.upload.ee/files/2443041/crapster.sma.html

 

;)

ma usun et see tõõtab.

proovi shurxxx

Jaga seda postitust


Postituse link
Share on other sites
SUPERVIP
ma usun et see tõõtab.

proovi shurxxx

Nope, kui sa loed @jimaway postitust siis tead miks, kui ültse midagi amxmodx-st mõistad.

@Caffe kood peaks töötama laitmatult, kui just mõni teine plugin juba seda maxspeed-i ei muuda.

Kui nii juthub siis @sHURXXX kirjuta siis ja teen uue koodi.

 

maxspeed kaob ka relva scopet kasutades ära :D

Saan jälle nope öelda, curweapon saab kutse iga kord kui relvaga midagi juhtub kuna curweapon uuendab weapon hud süsteeme. ; )

Jaga seda postitust


Postituse link
Share on other sites
VIP
ma usun et see tõõtab.

proovi shurxxx

 

K2ska kui ma selle tõmbasin siis olid eest tähed kadunud. näitaks 22hp asemel oli 25 hp kilbi asemel oli ilp , kiiruse asemel oli iirus ja vip menu asem oli ip menu . :D


põhja-korea

Jaga seda postitust


Postituse link
Share on other sites

Kommentaari lisamiseks loo konto või logi sisse

Kommenteerimiseks peate olema liige

Loo konto

Liituge meie kommuuni uue kontoga. See on lihtne!

Loo uus konto

Logi sisse

On juba konto? Logi sisse siit.

Logi sisse nüüd

×
×
  • Loo uus...

Oluline informatsioon

Selle veebisaidi paremaks muutmiseks oleme teie seadmesse paigutanud küpsised . Võite kohandada oma küpsiste seadeid , vastasel juhul eeldame, et te olete küpsiste kasutamisega nõus kui jätkate veebisaidil sirvimist.. Palun lugege läbi Kasutustingimused ja Privaatsuspoliitika.