AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Req] Help !! (https://forums.alliedmods.net/showthread.php?t=274093)

Chihab Eddine 11-01-2015 13:44

[Req] Help !!
 
1 Attachment(s)
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)

HamletEagle 11-01-2015 14:13

Re: [Req] Help !!
 
Hook Ham_Item_PreFrame and apply the speed there too.

Chihab Eddine 11-02-2015 06:49

Re: [Req] Help !!
 
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();
        }
    }




All times are GMT -4. The time now is 18:15.

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