Raised This Month: $ Target: $400
 0% 

Lagging My server...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-24-2006 , 23:07   Lagging My server...
Reply With Quote #1

This plugin is lagging my server ever since I added Bunny Hop to it...

Code:
///////////////////////////// //AMXMOD[X]                // //Purchase Mod v0.4        // //By: Dizzy                // //(©)All rights reserved   // //                         // //Cvars:                   // //  amx_pmod (0|1) (off|on)// //                         // //Client Commands:         // //  pmodmenu               // ///////////////////////////// #include <amxmodx> #include <cstrike> #include <engine> #include <fun> #define PLUGIN  "Purchase Mod" #define VERSION "0.4" #define AUTHOR  "Dizzy" #define DISPLAY_MSG #define FL_WATERJUMP    (1<<11) #define FL_ONGROUND (1<<9) new const itemcvar[7][] = {     "amx_pmod_gravitycost",     "amx_pmod_speedcost",     "amx_pmod_stealthcost",     "amx_pmod_lasercost",     "amx_pmod_healthcost",     "amx_pmod_multijumpcost",     "amx_pmod_bunnyhop" }; new const itemname[7][] = {     "gravity",     "speed",     "stealth",     "laser",     "health",     "multijump",     "bunnyhop" }; new powerpur[33] = 1; new powerpurgravity[33] = 1; new powerpurspeed[33] = 1; new powerpurstealth[33] = 1; new powerpurlaser[33] = 1; new powerpurhealth[33] = 1; new powerpurmultijump[33] = 1; new powerpurbunnyhop[33] = 1; new jumpnum[33]; new bool:dojump[33]; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_cvar("amx_pmod",  "1"   );     register_cvar("maxjumps","3")     register_cvar(itemcvar[0], "4000");     register_cvar(itemcvar[1], "4000");     register_cvar(itemcvar[2], "4500");     register_cvar(itemcvar[3], "1000");     register_cvar(itemcvar[4], "1500");     register_cvar(itemcvar[5], "4000");     register_cvar(itemcvar[6], "4500");     register_menucmd(register_menuid("Purchase Mod"), 1023, "pickoption");     register_clcmd("say pmodmenu",      "showMENU");     register_clcmd("say_team pmodmenu", "showMENU");     register_concmd("pmodmenu",         "showMENU");     register_event("ResetHUD",   "roundchange", "b"         );     register_event("CurWeapon" , "speedb" ,     "be" , "1=1"); } public plugin_precache() {     precache_sound("purchasemod/buy.wav");     precache_sound("purchasemod/drain.wav");     precache_sound("purchasemod/sorry.wav"); } #if defined DISPLAY_MSG public client_putinserver(id) {     if (is_user_bot(id))         return;         set_task(25.0, "inform", id); } #endif #if defined DISPLAY_MSG public inform(id) {     client_print(id, print_chat, "[Purchase Mod]: This server is running Purchase Mod -- By: Dizzy");     client_print(id, print_chat, "[Purchase Mod]: Type pmodmenu to start!");     return PLUGIN_HANDLED; } #endif public showMENU(id) {     new menu[192];     new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_9;     format(menu, 191, "Purchase Mod^n^n1. Gravity^n2. Speed^n3. Stealth^n4. Laser^n5. Health^n6. Multi-Jump^n7. Bunny Hop^n0. Exit");     show_menu(id,keys,menu);     return PLUGIN_HANDLED; } public pickoption(id, key) {     if(!get_cvar_num("amx_pmod"))     {         client_print(id, print_chat, "[Purchase Mod]: Sorry, the plugin is off!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     else if(!is_user_alive(id))     {         client_print(id, print_chat, "[Purchase Mod]: You must be alive to purchase this item!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     else if(powerpur[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: You already purchased a different skill!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     new money = cs_get_user_money(id);     new cost = get_cvar_num(itemcvar[key]);     if(cost > money)     {         client_print(id, print_chat, "[Purchase Mod]: You don't have enough money!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     cs_set_user_money(id, (money - cost), 1);     client_cmd(id,"spk purchasemod/buy");     client_print(id, print_chat, "[Purchase Mod]: You purchased %s for $%i!", itemname[key], cost);     switch(key)     {         case 0:         {             set_user_gravity(id, 0.25);             powerpurgravity[id] = 0;             powerpur[id] = 0;         }         case 1:         {             new Float:speed = get_user_maxspeed(id) + 680.0;             set_user_maxspeed(id, speed);             powerpurspeed[id] = 0;             powerpur[id] = 0;         }         case 2:         {             set_user_rendering(id, kRenderFxNone, 50, 50, 50, kRenderTransAdd, 50);             set_user_footsteps(id, 1);             powerpurstealth[id] = 0;             powerpur[id] = 0;         }         case 3:         {             set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 30.0, 0.1, 0.1, 10);             show_hudmessage(id, "*");             powerpurlaser[id] = 0;             powerpur[id] = 0;         }         case 4:         {             set_user_health(id, get_user_health(id) + 50);             powerpurhealth[id] = 0;             powerpur[id] = 0;         }         case 5:         {             powerpurmultijump[id] = 0;             powerpur[id] = 0;         }         case 6:         {             powerpurbunnyhop[id] = 0;             powerpur[id] = 0;         }     }     return PLUGIN_HANDLED; } public client_PreThink(id) {     if(powerpurmultijump[id] == 0)     {         new nbut = get_user_button(id);         new obut = get_user_oldbutton(id);         if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))         {             if(jumpnum[id] < get_cvar_num("amx_maxjumps"))             {                 dojump[id] = true;                 jumpnum[id]++;                 return PLUGIN_CONTINUE;             }         }         jumpnum[id] = 0;         return PLUGIN_CONTINUE;     }     if(powerpurbunnyhop[id] == 0)     {         entity_set_float(id, EV_FL_fuser2, 0.0);         if (entity_get_int(id, EV_INT_button) & 2)         {             new flags = entity_get_int(id, EV_INT_flags);             if (flags & FL_WATERJUMP)             {                 return PLUGIN_CONTINUE;             }             if (entity_get_int(id, EV_INT_waterlevel) >= 2)             {                 return PLUGIN_CONTINUE;             }             if(!(flags & FL_ONGROUND))             {                 return PLUGIN_CONTINUE;             }             new Float:velocity[3];             entity_get_vector(id, EV_VEC_velocity, velocity);             velocity[2] += 250.0;             entity_set_vector(id, EV_VEC_velocity, velocity);             entity_set_int(id, EV_INT_gaitsequence, 6);         }         return PLUGIN_CONTINUE;     }     return PLUGIN_CONTINUE; } public client_PostThink(id) {     if(dojump[id] == true && powerpurmultijump[id] == 0)     {         new Float:velocity[3];          entity_get_vector(id,EV_VEC_velocity,velocity);         velocity[2] = random_float(265.0,285.0);         entity_set_vector(id,EV_VEC_velocity,velocity);         dojump[id] = false;         return PLUGIN_CONTINUE;     }     return PLUGIN_HANDLED; } public speedb(id) {     if(powerpurspeed[id] == 0)     {         new Float:speed = get_user_maxspeed(id) + 680.0;         set_user_maxspeed(id, speed);     }     return PLUGIN_HANDLED; } public roundchange(id) {     powerpur[id] = 1;     if(powerpurgravity[id] == 0)     {         set_user_gravity(id, 1.0);         client_cmd(id,"spk purchasemod/drain");         client_print(id, print_chat, "[Purchase Mod]: Gravity set back to normal!");         powerpurgravity[id] = 1;     }     if(powerpurspeed[id] == 0)     {         new Float:speed = get_user_maxspeed(id) - 680.0;         set_user_maxspeed(id,speed);         client_cmd(id,"spk purchasemod/drain");         client_print(id, print_chat, "[Purchase Mod]: Speed set back to normal!");         powerpurspeed[id] = 1;     }     if(powerpurstealth[id] == 0)     {         set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);         set_user_footsteps(id,0);         client_cmd(id,"spk purchasemod/drain");         client_print(id, print_chat, "[Purchase Mod]: Stealth level set back to normal!");         powerpurstealth[id] = 1;     }     if(powerpurlaser[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: Laser bulb burnt out!");         client_cmd(id,"spk purchasemod/drain");         powerpurlaser[id] = 1;     }     if(powerpurhealth[id] == 0)     {         powerpurhealth[id] = 1;     }     if(powerpurmultijump[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: Multi-Jump ability ran out!");         client_cmd(id,"spk purchasemod/drain");         powerpurmultijump[id] = 1;     }     if(powerpurbunnyhop[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: Bunny Hop ability ran out!");         client_cmd(id,"spk purchasemod/drain");         powerpurbunnyhop[id] = 1;     }     return PLUGIN_HANDLED; }

Anyone have any idea??? all the bunny hopping script wasn't there before and it worked perfect...

Bunny hop works... but it's mad laggy, like no fps...
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
Atti53
Member
Join Date: Oct 2005
Old 02-25-2006 , 07:39   Re: Lagging My server...
Reply With Quote #2

Quote:
Originally Posted by Dizzy
This plugin is lagging my server ever since I added Bunny Hop to it...


Bunny hop works... but it's mad laggy, like no fps...

then simpely remove bunnyhop..
__________________
(\_/)
(O.O)
(> <) <---- Put the evil bunny in your sign, help him achieve "WORLD DOMINATION!"
Atti53 is offline
Send a message via MSN to Atti53
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-25-2006 , 08:14  
Reply With Quote #3

Try returning PLUGIN_CONTINUE at the end of client_PostThink instead of PLUGIN_HANDLED.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-25-2006 , 15:24  
Reply With Quote #4

Hawk, before you posted, I wtried to get my plugin to have a double menu (two pages) and now it won't compile right...

Here...

Code:
///////////////////////////// //AMXMOD[X]                // //Purchase Mod v0.4        // //By: Dizzy                // //(©)All rights reserved   // //                         // //Cvars:                   // //  amx_pmod (0|1) (off|on)// //                         // //Client Commands:         // //  pmodmenu               // ///////////////////////////// #include <amxmodx> #include <cstrike> #include <engine> #include <fun> #define PLUGIN  "Purchase Mod" #define VERSION "0.4" #define AUTHOR  "Dizzy" #define DISPLAY_MSG #define FL_WATERJUMP    (1<<11) #define FL_ONGROUND (1<<9) new const itemcvar[8][] = {     "amx_pmod_gravitycost",     "amx_pmod_speedcost",     "amx_pmod_stealthcost",     "amx_pmod_lasercost",     "amx_pmod_healthcost",     "amx_pmod_multijumpcost",     "amx_pmod_bunnyhop",     "amx_pmod_flashglasses" }; new const itemname[8][] = {     "gravity",     "speed",     "stealth",     "laser",     "health",     "multijump",     "bunnyhop",     "flashglasses" }; new statepage[33]; new powerpur[33] = 1; new powerpurgravity[33] = 1; new powerpurspeed[33] = 1; new powerpurstealth[33] = 1; new powerpurlaser[33] = 1; new powerpurhealth[33] = 1; new powerpurmultijump[33] = 1; new powerpurbunnyhop[33] = 1; new powerpurflashglasses[33] = 1; new jumpnum[33]; new bool:dojump[33]; new g_msgscreenfade; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_cvar("amx_pmod","1");     register_cvar("maxjumps","3")     register_cvar(itemcvar[0],"4000");     register_cvar(itemcvar[1],"4000");     register_cvar(itemcvar[2],"4500");     register_cvar(itemcvar[3],"1000");     register_cvar(itemcvar[4],"1500");     register_cvar(itemcvar[5],"4000");     register_cvar(itemcvar[6],"4500");     register_cvar(itemcvar[7],"2500");     register_menucmd(register_menuid("Purchase Mod"), 1023, "menu");     register_clcmd("say pmodmenu","showMENU");     register_clcmd("say_team pmodmenu","showMENU");     register_concmd("pmodmenu","showMENU");     register_concmd("pmodmenu2","showMENUtwo");     register_event("ResetHUD","roundchange","b");     register_event("CurWeapon","speedb","be","1=1");     register_event("ScreenFade","event_blinded","be","4=255","5=255","6=255","7>199")     g_msgscreenfade = get_user_msgid("ScreenFade") } ////////////////////// //      SOUNDS      // ////////////////////// public plugin_precache() {     precache_sound("purchasemod/buy.wav");     precache_sound("purchasemod/drain.wav");     precache_sound("purchasemod/sorry.wav"); } ////////////////////// //      INFORM      // ////////////////////// #if defined DISPLAY_MSG public client_putinserver(id) {     if (is_user_bot(id))         return;         set_task(25.0, "inform", id); } #endif #if defined DISPLAY_MSG public inform(id) {     client_print(id, print_chat, "[Purchase Mod]: This server is running Purchase Mod -- By: Dizzy");     client_print(id, print_chat, "[Purchase Mod]: Type pmodmenu to start!");     return PLUGIN_HANDLED; } #endif ////////////////////// //    SHOWMENU      // ////////////////////// public showMENU(id) {     new menu[192];     new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_9;     new page = MENU_KEY_0|MENU_KEY_1|MENU_KEY_7|MENU_KEY_9;     format(menu, 191, "Purchase Mod^n^n1. Gravity^n2. Speed^n3. Stealth^n4. Laser^n5. Health^n6. Multi-Jump^n9. Next^n0. Exit");     show_menu(id,keys,menu);     format(menu, 191, "Purchase Mod(Continued)^n^n1. Bunny Hop^n2. Flash Glasses^n8. Previous^n0. Exit");     show_menu(id,keys,menu);     return PLUGIN_HANDLED; } ////////////////////// //       MENU1      // ////////////////////// public menu(id, key) {     if(!get_cvar_num("amx_pmod"))     {         client_print(id, print_chat, "[Purchase Mod]: Sorry, the plugin is off!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     else if(!is_user_alive(id))     {         client_print(id, print_chat, "[Purchase Mod]: You must be alive to purchase this item!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     else if(powerpur[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: You already purchased a different skill!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     new money = cs_get_user_money(id);     new cost = get_cvar_num(itemcvar[key]);     if(cost > money)     {         client_print(id, print_chat, "[Purchase Mod]: You don't have enough money!");         client_cmd(id,"spk purchasemod/sorry");         return PLUGIN_HANDLED;     }     cs_set_user_money(id, (money - cost), 1);     client_cmd(id,"spk purchasemod/buy");     client_print(id, print_chat, "[Purchase Mod]: You purchased %s for $%i!", itemname[key], cost);     switch(key)     {         case 0:         {             set_user_gravity(id, 0.25);             powerpurgravity[id] = 0;             powerpur[id] = 0;         }         case 1:         {             new Float:speed = get_user_maxspeed(id) + 680.0;             set_user_maxspeed(id, speed);             powerpurspeed[id] = 0;             powerpur[id] = 0;         }         case 2:         {             set_user_rendering(id, kRenderFxNone, 50, 50, 50, kRenderTransAdd, 50);             set_user_footsteps(id, 1);             powerpurstealth[id] = 0;             powerpur[id] = 0;         }         case 3:         {             set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 10.0, 0.1, 0.1, 10);             show_hudmessage(id, "*");             set_task(5.0,"laser_loop",id);             powerpurlaser[id] = 0;             powerpur[id] = 0;         }         case 4:         {             set_user_health(id, get_user_health(id) + 50);             powerpurhealth[id] = 0;             powerpur[id] = 0;         }         case 5:         {             powerpurmultijump[id] = 0;             powerpur[id] = 0;         }         case 6:         {             switch(page)             {                 case 0:                 {                     powerpurbunnyhop[id] = 0;                     powerpur[id] = 0;                 }                 case 1:                 {                     powerpurflashglasses[id] = 0;                     powerpur[id] = 0;                 }                 case 2:                 {                     switch(page-1)                 }             }         }     }     return PLUGIN_HANDLED; } ////////////////////// //    PRETHINK      // ////////////////////// public client_PreThink(id) {     if(powerpurmultijump[id] == 0)     {         new nbut = get_user_button(id);         new obut = get_user_oldbutton(id);         if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))         {             if(jumpnum[id] < get_cvar_num("amx_maxjumps"))             {                 dojump[id] = true;                 jumpnum[id]++;                 return PLUGIN_CONTINUE;             }         }         jumpnum[id] = 0;         return PLUGIN_CONTINUE;     }     if(powerpurbunnyhop[id] == 0)     {         entity_set_float(id, EV_FL_fuser2, 0.0);         if (entity_get_int(id, EV_INT_button) & 2)         {             new flags = entity_get_int(id, EV_INT_flags);             if (flags & FL_WATERJUMP)             {                 return PLUGIN_CONTINUE;             }             if (entity_get_int(id, EV_INT_waterlevel) >= 2)             {                 return PLUGIN_CONTINUE;             }             if(!(flags & FL_ONGROUND))             {                 return PLUGIN_CONTINUE;             }             new Float:velocity[3];             entity_get_vector(id, EV_VEC_velocity, velocity);             velocity[2] += 250.0;             entity_set_vector(id, EV_VEC_velocity, velocity);             entity_set_int(id, EV_INT_gaitsequence, 6);         }         return PLUGIN_CONTINUE;     }     return PLUGIN_HANDLED; } ////////////////////// //    POSTTHINK     // ////////////////////// public client_PostThink(id) {     if(dojump[id] == true && powerpurmultijump[id] == 0)     {         new Float:velocity[3];          entity_get_vector(id,EV_VEC_velocity,velocity);         velocity[2] = random_float(265.0,285.0);         entity_set_vector(id,EV_VEC_velocity,velocity);         dojump[id] = false;         return PLUGIN_CONTINUE;     }     return PLUGIN_CONTINUE; } ////////////////////// //      SPEEDB      // ////////////////////// public speedb(id) {     if(powerpurspeed[id] == 0)     {         new Float:speed = get_user_maxspeed(id) + 680.0;         set_user_maxspeed(id, speed);     }     return PLUGIN_HANDLED; } ////////////////////// //    LASER LOOP    // ////////////////////// public laser_loop(id) {     set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 10.0, 0.1, 0.1, 10);     show_hudmessage(id, "*");     if(powerpurlaser[id] == 0)     {         set_task(0.0,"laser_loop",id);     }     return PLUGIN_HANDLED; } ////////////////////// //   FLASH EVENT    // ////////////////////// public event_blinded(id) {     if(powerpurflashglasses[id] == 0)     {         message_begin(MSG_ONE, g_msgscreenfade, {0, 0, 0}, id);         write_short(0);         write_short(0);         write_short(0);         write_byte(0);         write_byte(0);         write_byte(0);         write_byte(0);         message_end();     }     return PLUGIN_HANDLED; } ////////////////////// //   ROUNDCHANGE    // ////////////////////// public roundchange(id) {     powerpur[id] = 1;     if(powerpurgravity[id] == 0)     {         set_user_gravity(id, 1.0);         client_cmd(id,"spk purchasemod/drain");         client_print(id, print_chat, "[Purchase Mod]: Gravity set back to normal!");         powerpurgravity[id] = 1;     }     if(powerpurspeed[id] == 0)     {         new Float:speed = get_user_maxspeed(id) - 680.0;         set_user_maxspeed(id,speed);         client_cmd(id,"spk purchasemod/drain");         client_print(id, print_chat, "[Purchase Mod]: Speed set back to normal!");         powerpurspeed[id] = 1;     }     if(powerpurstealth[id] == 0)     {         set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);         set_user_footsteps(id,0);         client_cmd(id,"spk purchasemod/drain");         client_print(id, print_chat, "[Purchase Mod]: Stealth level set back to normal!");         powerpurstealth[id] = 1;     }     if(powerpurlaser[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: Laser bulb burnt out!");         client_cmd(id,"spk purchasemod/drain");         powerpurlaser[id] = 1;     }     if(powerpurhealth[id] == 0)     {         powerpurhealth[id] = 1;     }     if(powerpurmultijump[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: Multi-Jump ability ran out!");         client_cmd(id,"spk purchasemod/drain");         powerpurmultijump[id] = 1;     }     if(powerpurbunnyhop[id] == 0)     {         client_print(id, print_chat, "[Purchase Mod]: Bunny Hop ability ran out!");         client_cmd(id,"spk purchasemod/drain");         powerpurbunnyhop[id] = 1;     }     return PLUGIN_HANDLED; }

I get 4 warnings and 3 errors:

Code:
//// purchasemod.sma
// C:\Program Files\Steam\SteamApps\[email protected]\dedicated server\cs
trike\addons\amxmodx\scripting\purchasemod.sma(132) : warning 204: symbol is ass
igned a value that is never used: "page"
// C:\Program Files\Steam\SteamApps\[email protected]\dedicated server\cs
trike\addons\amxmodx\scripting\purchasemod.sma(219) : error 017: undefined symbo
l "page"
// C:\Program Files\Steam\SteamApps\[email protected]\dedicated server\cs
trike\addons\amxmodx\scripting\purchasemod.sma(233) : error 017: undefined symbo
l "page"
// C:\Program Files\Steam\SteamApps\[email protected]\dedicated server\cs
trike\addons\amxmodx\scripting\purchasemod.sma(239) : error 002: only a single s
tatement (or expression) can follow each "case"
// C:\Program Files\Steam\SteamApps\[email protected]\dedicated server\cs
trike\addons\amxmodx\scripting\purchasemod.sma(239) : warning 215: expression ha
s no effect
// C:\Program Files\Steam\SteamApps\[email protected]\dedicated server\cs
trike\addons\amxmodx\scripting\purchasemod.sma(240) : warning 209: function "men
u" should return a value
// C:\Program Files\Steam\SteamApps\[email protected]\dedicated server\cs
trike\addons\amxmodx\scripting\purchasemod.sma(406) : warning 203: symbol is nev
er used: "statepage"
//
// 3 Errors.
// Could not locate output file compiled\purchasemod.amx (compile failed).
//
// Compilation Time: 0.73 sec
// ----------------------------------------
and I can't figure them out...
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
Petey B
Member
Join Date: Feb 2005
Old 02-25-2006 , 23:53  
Reply With Quote #5

Code:
public client_PostThink(id) 
{ 
    if(dojump[id] == true && powerpurmultijump[id] == 0) 
    { 
        new Float:velocity[3];     
        entity_get_vector(id,EV_VEC_velocity,velocity); 
        velocity[2] = random_float(265.0,285.0); 
        entity_set_vector(id,EV_VEC_velocity,velocity); 
        dojump[id] = false; 
        return PLUGIN_CONTINUE; 
    } 
    return PLUGIN_HANDLED; 
}
remove both the returns
Petey B is offline
Send a message via MSN to Petey B
Jordan
Veteran Member
Join Date: Aug 2005
Old 02-26-2006 , 00:20  
Reply With Quote #6

The problem with your most recent code is that you called a switch function and then never did the switch in the same public function.

Code:
                case 2:                 {                     switch(page-1) // see?                 }        }     }     } }     return PLUGIN_HANDLED; }

You also missed a } at one point.
Jordan is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-26-2006 , 20:27  
Reply With Quote #7

Quote:
Originally Posted by ^_^Satan^_^
The problem with your most recent code is that you called a switch function and then never did the switch in the same public function.

Code:
                case 2:                 {                     switch(page-1) // see?                 }        }     }     } }     return PLUGIN_HANDLED; }

You also missed a } at one point.
LOL Holy shit look at all those brackets >_>......
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Jordan
Veteran Member
Join Date: Aug 2005
Old 02-26-2006 , 21:14  
Reply With Quote #8

It looks nicer in AMXx Studio
Jordan 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 15:08.


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