ocmd:setstat(playerid, params[]){
new pID, stat, amount;
if(IstAdmin(playerid)){
if(sscanf(params, "udd", pID, stat,amount)){
SendClientMessage(playerid, COLOR_CORNSILK, "Benutzung: /setstat [id] [Statistikcode] [Wert]");
SendClientMessage(playerid, COLOR_CORNSILK, "Code: 1 Level | 2 Respekt | 3 Skin | 4 PKW | 5 LKW | 6 Bike | 7 Flugschein | 8 Premiumrang |");
SendClientMessage(playerid, COLOR_CORNSILK, "Code: 9 Job |");
return 1;}
new string[200];
switch (stat){
case 1:PI[pID][pLevel] = amount, format(string, sizeof(string), " Spielerlevel auf %d gesetzt", amount);
case 2:PI[pID][pRespekt] = amount,format(string, sizeof(string), " Respektpunkte auf %d gesetzt", amount);
case 3:PI[pID][pSkin] = amount,SetPlayerSkin(pID, amount),format(string, sizeof(string), " Spielerskin : %d", amount);
case 4:PI[pID][pCar] = amount,format(string, sizeof(string), " PKW - Führerschein : %d", amount);
case 5:PI[pID][pLKW] = amount,format(string, sizeof(string), " LKW - Führerschein : %d", amount);
case 6:PI[pID][pBike] = amount,format(string, sizeof(string), " Bike - Führerschein : %d", amount);
case 7:PI[pID][pFly] = amount,format(string, sizeof(string), " Flugschein : %d", amount);
case 8:PI[playerid][pPremium] = amount,format(string, sizeof(string), " Premiumrang : %d", amount);
case 9:PI[playerid][DT_Job] = amount,format(string, sizeof(string), " DT_Job : %d", amount);
default: format(string, sizeof(string), " Falscher Statistikcode", amount);}
SavePlayer(pID), SendClientMessage(playerid, FARBE_FADE1, string), SendClientMessage(pID, FARBE_FADE1, string);}
return 1;}
Musst nurnoch anpassen -.-