Moinsen.
Und zwar, versuche ich seit ner guten dreivirtelstunde, meinen /suspect befehl auf meinen wunsch zu basteln. klappt soweit aber..
Ich wollte versuchen das es möglich ist, /su [ID] -4 [GRUND] einzugeben, und die 4 abgezogen werden, oder oder /su [ID] 4 [GRUND] um 4 wanteds draufzurechnen.
Und die wanteds sollen halt nicht auf über 20 Steigen dürfen.
Wenn der Spieler bereits 17 Wanteds hat, und 4 bekommt, sollen es automatisch 20 bleiben.
Hier mal der Code..
ocmd:su(playerid,params[])
{
if(IsACop(playerid))
{
new string[128],pID,grund,wanteds, textdrawstring[128];
if(sscanf(params,"uis",pID,wanteds,grund)) return SendClientMessage(playerid,COLOR_GRAU,"Fehler: /su [ID] [WANTEDS] [GRUND]");
sDatei[pID][pWanteds] += wanteds;
switch(sDatei[pID][pWanteds])
{
case 0: {format(textdrawstring, sizeof(textdrawstring)," "),TextDrawHideForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 1:{format(textdrawstring, sizeof(textdrawstring),"[]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 2:{format(textdrawstring, sizeof(textdrawstring),"[][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 3:{format(textdrawstring, sizeof(textdrawstring),"[][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 4:{format(textdrawstring, sizeof(textdrawstring),"[][][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 5:{format(textdrawstring, sizeof(textdrawstring),"[][][][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 6:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 7:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 8:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 9:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 10:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted1),TextDrawHideForPlayer(playerid, Wanted2);}
case 11:{format(textdrawstring, sizeof(textdrawstring),"[]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 12:{format(textdrawstring, sizeof(textdrawstring),"[][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 13:{format(textdrawstring, sizeof(textdrawstring),"[][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 14:{format(textdrawstring, sizeof(textdrawstring),"[][][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 15:{format(textdrawstring, sizeof(textdrawstring),"[][][][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 16:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 17:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 18:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 19:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
case 20:{format(textdrawstring, sizeof(textdrawstring),"[][][][][][][][][][]"),TextDrawShowForPlayer(playerid, Wanted2);}
}
if(sDatei[pID][pWanteds] >= 0 && sDatei[pID][pWanteds] <= 10)
{
TextDrawSetString(Wanted1,textdrawstring);
}
if(sDatei[pID][pWanteds] >= 0 && sDatei[pID][pWanteds] <= 20)
{
TextDrawSetString(Wanted2,textdrawstring);
}
}
else if(!IsACop(playerid))
{
SendClientMessage(playerid,COLOR_GRAU,"Fehler: Du bist kein Cop!");
}
return 1;
}
Bedanke mich jetztschoneinmal wieder für eure hilfe.
LG Mike.