20576526 发表于 2009-6-28 07:23:36

Rulzy 帮忙看看加速代码有没有错误

本帖最后由 20576526 于 2009-6-28 07:26 编辑

public client_connect(id)
{
        powerpur = 1;
        powerpurgravity = 1;
        powerpurspeed = 1;
        powerpurstealth = 1;
        powerpurlaser = 1;
        powerpurflashglasses = 1;
        powerpurmultijump = 1;
        powerpurbunnyhop = 1;
        powerpurhealth = 1;
        powerpurparachute = 1;
}

public client_disconnect(id)
{
        powerpur = 1;
        powerpurgravity = 1;
        powerpurspeed = 1;
        powerpurstealth = 1;
        powerpurlaser = 1;
        powerpurflashglasses = 1;
        powerpurmultijump = 1;
        powerpurbunnyhop = 1;
        powerpurflashglasses = 1;
        powerpurparachute = 1;
}cs_set_user_money(id, (money - 5000), 1);
                        client_cmd(id,"spk purchasemod/buy");
                        client_print(id, print_chat, "【系统提示】: 您购买速度需要$5000元!");
                        new Float:speed = get_user_maxspeed(id) + 30.0;
                        set_user_maxspeed(id, speed);
                        powerpurspeed = 0;
                        powerpur = 0;
                }public speedb(id)
{
        if(powerpurspeed == 0)
        {
                new Float:speed = get_user_maxspeed(id) + 30.0;
                set_user_maxspeed(id, speed);
        }
        return PLUGIN_HANDLED;
}if(powerpurspeed == 0)
        {
                new Float:speed = get_user_maxspeed(id) - 30.0;
                set_user_maxspeed(id,speed);
                client_cmd(id,"spk purchasemod/drain");
                client_print(id, print_chat, "【系统提示】: 速度恢复正常!");
                powerpurspeed = 1;
        }我把所有加速的代码发上去了,问题:购买加速后没有加速,然后打死个人速度飞快,请问这个是怎么回事情呢?是不是+30的代码那里不合理造成的呀?还有换图后也是这个问题,
页: [1]
查看完整版本: Rulzy 帮忙看看加速代码有没有错误