Raised This Month: $ Target: $400
 0% 

[Req] Help !!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chihab Eddine
Member
Join Date: Aug 2014
Location: Morroco
Old 11-01-2015 , 13:44   [Req] Help !!
Reply With Quote #1

Hello , I Have problem in my plugin if i buy speed boost and i change weapon and speed boost leave
(Soory For my bad english)
Attached Files
File Type: sma Get Plugin or Get Source (bb_extra_speed_boost.sma - 315 views - 1.5 KB)
__________________
Proud to be Morrocan

Last edited by Chihab Eddine; 11-01-2015 at 13:45.
Chihab Eddine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-01-2015 , 14:13   Re: [Req] Help !!
Reply With Quote #2

Hook Ham_Item_PreFrame and apply the speed there too.
__________________
HamletEagle is offline
Chihab Eddine
Member
Join Date: Aug 2014
Location: Morroco
Old 11-02-2015 , 06:49   Re: [Req] Help !!
Reply With Quote #3

I Have Do WhatYou Say But Problem Stay
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <ammopacks>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Item_SpeedBoost"
#define VERSION "1.0"
#define AUTHOR "Chihab"

new item
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Item_PreFrame"player""FwdPreFrame_Post"1)
    
    
item=dodaj_extra_item("Speed Boost \r[+50 % Speed]",25,2)
    
}
public 
wybrano_item(id,item_id){
    if(
item_id==item){
        
set_user_maxspeed(idget_user_maxspeed(id) + 450);
        
client_printc(id"!g[LG][BaseBuilder] !nYou Bought Speed Boost !g+50 %");
    }
    
}
public 
FwdPreFrame_Post(id)
{
    if(
is_user_alive(id)) 
    
set_user_maxspeed(idget_user_maxspeed(id) + 450);
}
public 
FwdHamSpawn_Post(id)
{
    
set_user_maxspeed(idget_user_maxspeed(id) + 250);
    
set_user_renderingid_000_);  
}
// Colour Chat
stock client_printc(const id, const input[], any:...)
{
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^x04"); // Green Color
    
replace_all(msg190"!n""^x01"); // Default Color
    
replace_all(msg190"!t""^x03"); // Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
    for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }

__________________
Proud to be Morrocan

Last edited by Chihab Eddine; 11-03-2015 at 14:03.
Chihab Eddine 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 18:15.


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