^dcmd_setskin(playerid,params[]) {
if(IsPlayerAdmin(playerid)) {
new tmp[256],tmp2[256],Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(tmp)||!strlen(tmp2)||!IsNumeric(tmp2)) return SendClientMessage(playerid,red,"Syntax Error: \"/SETSKIN <NICK OR ID> <SKINID>\".");
if(!IsSkinValid(strval(tmp2))) return SendClientMessage(playerid,red,"ERROR: Invalid skin ID.");
new id; if(!IsNumeric(tmp)) id = ReturnPlayerID(tmp); else id = strval(tmp);
if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID) {
new string[256],name[24],ActionName[24]; GetPlayerName(playerid,name,24); GetPlayerName(id,ActionName,24);
//SendCommandMessageToAdmins(playerid,"SETSKIN");
if(id != playerid) { format(string,256,"Administrator \"%s\" has set your skin to ID %d.",name,strval(tmp2)); SendClientMessage(id,yellow,string); format(string,256,"You have set \"%s's\" skin ID to %d.",ActionName,strval(tmp2)); SendClientMessage(playerid,yellow,string); }
else { format(string,256,"You have set your skin ID to %d.",strval(tmp2)); SendClientMessage(playerid,yellow,string); }
return SetPlayerSkin(id,strval(tmp2));
} return SendClientMessage(playerid,red,"ERROR: You can not set a disconnected player's skin.");
} else return SendClientMessage(playerid,COLOR_RED,"Du bist kein Admin");
}
So da haste einen brocken
Ist aus XA2 System kopiert, und ein bisschen auf RCON Angepasst.
Achja: Es ist nicht getestet.Falls du es nicht hinbekommst, sag bescheid ich mach dir den COmmand dann fertig.
Habe grad nur keine Zeit.
MFG,Cedi