Hallo Breadfish!
Ich frage mich wieso /setskin nach dem Tod nicht gespeichert wurde.. Sollte eigentlich oder?
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
}
dcmd_setskin(playerid,params[])
{
new pID, sID, string[256];
if (sscanf(params, "ud", pID, sID)) SendClientMessage(playerid, COLOR_GREY, "Benutze /setskin [ID] [SkinID]");
else if (sID < 0 || sID > 299) SendClientMessage(playerid, COLOR_GREY, "Der Skin muss zwischen 0 und 299 liegen!");
else
{
if(pInfo[playerid][pRank] == 5 || IsPlayerAdmin(playerid))
{
new admin[MAX_PLAYER_NAME], player[MAX_PLAYER_NAME];
GetPlayerName(pID, player, sizeof(player));
GetPlayerName(playerid, admin, sizeof(admin));
format(string, sizeof(string), "Admin %s hat dir den Skin %d gegeben..",admin,sID);
SendClientMessage(pID, COLOR_GREEN, string);
format(string, sizeof(string), "Du hast %s den Skin %d gegeben.",player,sID);
SendClientMessage(playerid, COLOR_YELLOW2, string);
SetPlayerSkin(pID, sID);
pInfo[playerid][pSkin] = sID;
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist kein Admin!");
}
return 1;
}
return 0;
}