Comanda [/speed] ai putea sa o simplifici astfel:
CMD:speed(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 6)
{
if(SpeedBoost[playerid])
{
SpeedBoost[playerid] = 0; // Dezactivat
SCM(playerid, COLOR_RED, "[Speed Boost]Ai dezactivat comanda Speed Boost!");
}
else
{
SpeedBoost[playerid] = 1; // Activat
SCM(playerid, COLOR_GREEN, "[Speed Boost]Ai activat comanda Speed Boost!");
}
}
return 1;
}
CMD:speed(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid, COLOR_WHITE, "You are not an admin.");
if(SpeedBoost[playerid] == 1) SpeedBoost[playerid] = 0, SCM(playerid, COLOR_WHITE, "Ai dezactivat speedboost");
else SpeedBoost[playerid] = 1, SCM(playerid, COLOR_WHITE, "Ai activat speedboost.");
return 1;
}