22.02.2013, 00:45
(
Последний раз редактировалось Fernado Samuel; 02.06.2013 в 21:42.
)
Removed, thanks for the help!
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;
}
CMD:ssb(playerid, params[])
{
return cmd_setspeedboost(playerid, params)
}