Hallo ich habe ein Script aus dem inet genommen und habe ein Problem. Bei /skill stand kein Detectiv bei daher habe ich es selber einfach dazu geschrieben.
{
new x_nr[24];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Skill Info __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /skill [number]");
SendClientMessage(playerid, COLOR_GREY, "| 1: Lawyer 6: Boxer");
SendClientMessage(playerid, COLOR_GREY, "| 2: Whore 7: Fishing");
SendClientMessage(playerid, COLOR_GREY, "| 3: Drugs Dealer 8: Detectiv");
SendClientMessage(playerid, COLOR_GREY, "| 4: News Reporter");
SendClientMessage(playerid, COLOR_GREY, "| 5: Car mechanic");
SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
return 1;
}
Dann habe ich noch das hinzu geschrieben unter den Fishing Job:
else if(strcmp(x_nr,"1",true) == 0)//Detectiv
{
new level = PlayerInfo[playerid][pDetSkill];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detectiv Skill Level = 1."); format(string, sizeof(string), "You need to find %d more people to Level up.", 50 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detectiv Skill Level = 2."); format(string, sizeof(string), "You need to find %d more people to Level up.", 50 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 150) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detectiv Skill Level = 3."); format(string, sizeof(string), "You need to find %d more people to Level up.", 50 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 151 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detectiv Skill Level = 4."); format(string, sizeof(string), "You need to find %d more people to Level up.", 50 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detectiv Skill Level = 5."); }
}
Aber wenn ich /skill 8 mache kommt "Invalid Skill Number".
Hoffe ihr könnt mir helfen.
p.s. Bin nicht der Super Scripter also net so schwer machen pls^^