#1

Removed, thanks for the help!
Reply
#2

try this .
#include <zcmd> //on top

pawn Код:
CMD:ssb(playerid, params[])
{
return cmd_setspeedboost(playerid, params);
}
CMD:setspeedboost(playerid, params[])
{
        new strBoostMultiplier[256];
        new strTempString[256];
        new Index;
        strBoostMultiplier = strtok(cmdtext, Index);
        if (isnull(strBoostMultiplier))
        {
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "** Usage: /setspeedboost <SpeedBoostMultiplier>");
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* Allows you to set the speed boost multiplier that is applied when you press the horn key.");
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* Accepted speed boost multiplier values are between 1.0 and 3.0");
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* The shortcut for this command is: /ssb");
        format(strTempString,sizeof(strTempString), "* Your current speed boost multiplier is: %0.2f", SpeedBoostMultiplier[playerid]);
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, strTempString);
        return 1;
        }
        if (!IsNumeric2(strBoostMultiplier))
        {
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "** Usage: /setspeedboost <BoostMultiplier>");
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* Allows you to set the speed boost multiplier that is applied when you press the horn key.");
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* Accepted speed boost multiplier values are between 1.0 and 3.0");
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* The shortcut for this command is: /ssb");
        format(strTempString,sizeof(strTempString), "* Your current speed boost multiplier is: %0.2f", SpeedBoostMultiplier[playerid]);
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, strTempString);
        return 1;
        }
        new Float:BoostMultiplier = floatstr(strBoostMultiplier);

        if (BoostMultiplier < 1.0 || BoostMultiplier > 3.0)
        {
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* Sorry, you must enter a speed boost multiplier between 1.0 and 3.0");
        return 1;
        }
        SpeedBoostMultiplier[playerid] = BoostMultiplier;
        format(strTempString,sizeof(strTempString), "* You set your speed boost multiplier to %0.2f", SpeedBoostMultiplier[playerid]);
        SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, strTempString);
        return 1;
}
Reply
#3

pawn Код:
CMD:ssb(playerid, params[])
{
return cmd_setspeedboost(playerid, params)
}
You forgot the ';' at the end of that.

Oh and the conversion is wrong...
Reply
#4

Oh Ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)