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

Fix This Plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Taha_rajper
Member
Join Date: Jun 2021
Location: Under The Sea
Old 07-13-2022 , 09:29   Fix This Plugin?
Reply With Quote #1

Hello, I Have This Plugin But Speed Doesn't Work
Can Anyone Please Help And Fix It
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <xs>
#include <engine>


public plugin_init() {

    
register_clcmd("menu_svip""sMenu");
    
    
RegisterHam(Ham_Spawn"player""fwdPlayerSpawn"1); //Player Spawn Post
    
    
register_plugin("Elite SM""1.0""Razer");

}


public 
fwdPlayerSpawn(id){

    
set_task(0.5"sMenu"id)

}

public 
sMenu(id
{
    if(!(
get_user_flags(id) & ADMIN_LEVEL_G))
    {
        return;
    }
    
new 
i_Menu menu_create("\wSUPER-VIP MENU""menu_handler");
menu_additem(i_Menu"\y350 \wHealth""1"0);
menu_additem(i_Menu"\y350 \wArmor""2"0);
menu_additem(i_Menu"\y550 \wGravity""3"0);
menu_additem(i_Menu"\y525 \wSpeed""4"0);
menu_additem(i_Menu"\wGrenade Pack""5"0);
menu_additem(i_Menu"\wNightvision [\yFor Dark Maps\w]""6"0);
menu_additem(i_Menu"\wAll in One \y[\rAdmins Only\y]""7"ADMIN_SLAY);
menu_setprop(i_MenuMPROP_NEXTNAME"Next");
menu_setprop(i_MenuMPROP_BACKNAME"Back");
menu_setprop(i_MenuMPROP_EXITNAME"Exit");

menu_display(idi_Menu0)
}

//public client_authorized(id)
//{
//client_cmd(id, "bind ^"M^" ^"menu^"")
//}

public menu_handler(idmenuitem) {
if( 
item ) return PLUGIN_CONTINUE;
new 
cmd[3], accesscallback;
menu_item_getinfo(menuitemaccesscmd,2,_,_callback);
new 
Choise str_to_num(cmd)
switch (
Choise) {
case 
1: {
set_user_health(id350)
}
case 
2: {
set_user_armor(id350)
}
case 
3: {
set_user_gravity(id0.65)
}
case 
4: {
new 
Floatspeed
set_user_maxspeed
(id525)
}
case 
5: {
give_item(id"CSW_HEGRENADE")
give_item(id"CSW_SMOKEGRENADE")
}
case 
6: {
cs_set_user_nvg(id)
}
case 
7: {
set_user_health(id350)
set_user_armor(id350)
set_user_gravity(id0.65)
set_user_maxspeed(id525)
give_item(id"CSW_HEGRENADE")
give_item(id"CSW_SMOKEGRENADE")
cs_set_user_nvg(id)
}
}
return 
PLUGIN_HANDLED;

Taha_rajper is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-13-2022 , 11:27   Re: Fix This Plugin?
Reply With Quote #2

test

PHP Code:
set_user_maxspeed(id525.0
__________________
mlibre is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-13-2022 , 16:54   Re: Fix This Plugin?
Reply With Quote #3

maxspeed is reset every time player switches weapons.
jimaway is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-13-2022 , 23:47   Re: Fix This Plugin?
Reply With Quote #4

I feel like I've read that you have to set it in the CurWeapon event. I've never needed/wanted to do it so I'm not 100% sure, but I'm quite confident I've seen that stated before.
__________________
fysiks 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:59.


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