Raised This Month: $51 Target: $400
 12% 

Help with code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Subrosa007
Member
Join Date: Jan 2011
Location: Estonia
Old 12-23-2012 , 15:47   Help with code
Reply With Quote #1

Hey

Theres Errors

/tmp/textdw63Ra.sma(92) : error 017: undefined symbol "set_user_bammo"
/tmp/textdw63Ra.sma(101) : warning 217: loose indentation
/tmp/textdw63Ra.sma(101) : error 014: invalid statement; not in switch
/tmp/textdw63Ra.sma(101) : warning 215: expression has no effect
/tmp/textdw63Ra.sma(101) : error 001: expected token: ";", but found ":"
/tmp/textdw63Ra.sma(101) : error 029: invalid expression, assumed zero
/tmp/textdw63Ra.sma(101) : fatal error 107: too many error messages on one line

PHP Code:
#include <amxmodx> 
#include <fun> 
#include <cstrike> 
#include <engine> 

#define PLUGIN "JailBreak VipMenu"
#define VERSION "1.0"
#define AUTHOR Zirual"

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 
VIPMenuid 

if(!
has_used[id]) 

if(
get_user_flags(id) & ADMIN_LEVEL_B

new 
vip_menu menu_create"\rVip menu:""menu_handler" ); 
menu_additemvip_menu"\w200Hp and Ap.""1"); 
menu_additemvip_menu"\wGrenades complect""2"); 
menu_additemvip_menu"\wLow gravity""3"0); 
menu_additemvip_menu"\wP228 (\rWhith 1 bullet\w)""4"0);
menu_additemvip_menu"\wSpeed""5"0);
menu_additemvip_menu"\wInvisible""6"0);

menu_setpropvip_menuMPROP_EXITMEXIT_ALL ); 
menu_displayidvip_menu); 

else 

client_print(idprint_chat"[VIP] Sa pead olema *VIP* et seda kasutada!"


else 

client_print(idprint_chat"[VIP] Sa oled juba kasutanud menud!"



public 
menu_handleridmenuitem 

if( 
item == MENU_EXIT 

menu_destroymenu ); 
return 
PLUGIN_HANDLED

new 
data[6], iName[64]; 
new 
accesscallback

menu_item_getinfomenuitemaccessdata,5iName63callback ); 
new 
key str_to_numdata ); 
switch( 
key 

case 
1:

if( 
is_user_aliveid ) ) 

set_user_healthid200 ); //Sets health of id to 200
set_user_armorid200 ); //Sets armor of id to 200 


case 
2

if( 
is_user_aliveid ) ) 

give_itemid"weapon_hegrenade" )
give_itemid"weapon_flashbang" )
give_itemid"weapon_flashbang" )
give_itemid"weapon_smokegrenade" )


case 
3

if( 
is_user_aliveid ) ) 

set_user_gravityid0.5 ); 


case 
4:

if(
is_user_alive(id)) 

give_itemid"weapon_p228" );
set_user_bammoid);
}

case 
5

if( 
is_user_aliveid ) ) 

set_user_maxspeed(id500.0); 

case 
6:

if( 
is_user_aliveid ) ) 

set_user_rendering(id,kRenderFxGlowShell,0,00,kRenderTransAlpha40);





has_used[id] = true
menu_destroymenu ); 
return 
PLUGIN_HANDLED



public 
event_new_round() 
arrayset(has_usedfalse33
__________________

Last edited by YamiKaitou; 12-27-2012 at 22:28.
Subrosa007 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-23-2012 , 16:54   Re: Help with code
Reply With Quote #2

PHP Code:
precio8 register_cvar("jb_pGravity""8000" 


PHP Code:
precio8 register_cvar("jb_pGravity""8000"
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Old 12-24-2012, 00:47
c4mp3R
This message has been deleted by c4mp3R.
Subrosa007
Member
Join Date: Jan 2011
Location: Estonia
Old 12-24-2012 , 05:32   Re: Help with code
Reply With Quote #3

Okei, but when round start, then the gravity like sv_gravity 10000000000
__________________
Subrosa007 is offline
Subrosa007
Member
Join Date: Jan 2011
Location: Estonia
Old 12-24-2012 , 10:15   Re: Help with code
Reply With Quote #4

Wtf , why is that topic trash???
__________________
Subrosa007 is offline
c4mp3R
Junior Member
Join Date: Sep 2012
Old 12-24-2012 , 10:36   Re: Help with code
Reply With Quote #5

PHP Code:
precio8    register_cvar("jb_pGravity""8000"
WTF?
c4mp3R is offline
Subrosa007
Member
Join Date: Jan 2011
Location: Estonia
Old 12-24-2012 , 10:47   Re: Help with code
Reply With Quote #6

Just fix this code I cant jump when i spawn gravity is like 10000! Thank you!
__________________
Subrosa007 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-24-2012 , 11:58   Re: Help with code
Reply With Quote #7

Quote:
Originally Posted by Subrosa007 View Post
Just fix this code I cant jump when i spawn gravity is like 10000! Thank you!
Then change the gravity.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Subrosa007
Member
Join Date: Jan 2011
Location: Estonia
Old 12-24-2012 , 13:24   Re: Help with code
Reply With Quote #8

Quote:
Originally Posted by wickedd View Post
Then change the gravity.
Can`t! When i chance , then the gravity like 10000 stay !
__________________
Subrosa007 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-24-2012 , 13:30   Re: Help with code
Reply With Quote #9

With a gravity of 10000, you will never be able to jump. That is the nature of gravity.


Also, the cvar you created does not do what you think it does. It does not alter gravity.

Also, set_user_gravity isn't used that way. A value of 1.0 is normal gravity. You are setting a value of 400.0, so you are forcing the user to have 400 times normal gravity, thus not able to jump
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Old 12-24-2012, 13:33
wickedd
This message has been deleted by wickedd. Reason: Yami posted first
Subrosa007
Member
Join Date: Jan 2011
Location: Estonia
Old 12-24-2012 , 16:07   Re: Help with code
Reply With Quote #10

Yeah , thanks alot YamiKaitou

But somebody fix that vipmenu? I want that gun have 1 bullet

Errors:

/tmp/textdw63Ra.sma(92) : error 017: undefined symbol "set_user_bammo"
/tmp/textdw63Ra.sma(101) : warning 217: loose indentation
/tmp/textdw63Ra.sma(101) : error 014: invalid statement; not in switch
/tmp/textdw63Ra.sma(101) : warning 215: expression has no effect
/tmp/textdw63Ra.sma(101) : error 001: expected token: ";", but found ":"
/tmp/textdw63Ra.sma(101) : error 029: invalid expression, assumed zero
/tmp/textdw63Ra.sma(101) : fatal error 107: too many error messages on one line

PHP Code:
#include <amxmodx> 
#include <fun> 
#include <cstrike> 
#include <engine> 

#define PLUGIN "JailBreak VipMenu"
#define VERSION "1.0"
#define AUTHOR Zirual"

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 
VIPMenuid 

if(!
has_used[id]) 

if(
get_user_flags(id) & ADMIN_LEVEL_B

new 
vip_menu menu_create"\rVip menu:""menu_handler" ); 
menu_additemvip_menu"\w200Hp and Ap.""1"); 
menu_additemvip_menu"\wGrenades complect""2"); 
menu_additemvip_menu"\wLow gravity""3"0); 
menu_additemvip_menu"\wP228 (\rWhith 1 bullet\w)""4"0);
menu_additemvip_menu"\wSpeed""5"0);
menu_additemvip_menu"\wInvisible""6"0);

menu_setpropvip_menuMPROP_EXITMEXIT_ALL ); 
menu_displayidvip_menu); 

else 

client_print(idprint_chat"[VIP] Sa pead olema *VIP* et seda kasutada!"


else 

client_print(idprint_chat"[VIP] Sa oled juba kasutanud menud!"



public 
menu_handleridmenuitem 

if( 
item == MENU_EXIT 

menu_destroymenu ); 
return 
PLUGIN_HANDLED

new 
data[6], iName[64]; 
new 
accesscallback

menu_item_getinfomenuitemaccessdata,5iName63callback ); 
new 
key str_to_numdata ); 
switch( 
key 

case 
1:

if( 
is_user_aliveid ) ) 

set_user_healthid200 ); //Sets health of id to 200
set_user_armorid200 ); //Sets armor of id to 200 


case 
2

if( 
is_user_aliveid ) ) 

give_itemid"weapon_hegrenade" )
give_itemid"weapon_flashbang" )
give_itemid"weapon_flashbang" )
give_itemid"weapon_smokegrenade" )


case 
3

if( 
is_user_aliveid ) ) 

set_user_gravityid0.5 ); 


case 
4:

if(
is_user_alive(id)) 

give_itemid"weapon_p228" );
set_user_bammoid);
}

case 
5

if( 
is_user_aliveid ) ) 

set_user_maxspeed(id500.0); 

case 
6:

if( 
is_user_aliveid ) ) 

set_user_rendering(id,kRenderFxGlowShell,0,00,kRenderTransAlpha40);





has_used[id] = true
menu_destroymenu ); 
return 
PLUGIN_HANDLED



public 
event_new_round() 
arrayset(has_usedfalse33
__________________

Last edited by YamiKaitou; 12-27-2012 at 22:27.
Subrosa007 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 07:20.


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