/forceskin auch als leader nutzen

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Wie kann ich es einstellen das ein leader /forceskin auch nutzen kann? Damit der Leader auch die Skin´s ändern kann.


    Hier der ausschnit von /forceskin das müsste er sein
    }
    if(strcmp(cmd, "/forceskin", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " /forceskin [playerid]");
    return 1;
    }
    new para1;
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[para1][pMember] < 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist in keiner Fraktion!");
    return 1;
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du wurdest von Admin %s gezwungen deinen Skin zu wechseln.", sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du hast %s gezwungen den Skin zu wechseln.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    if(PlayerInfo[para1][pMember] == 1) { PlayerInfo[para1][pTeam] = 5; ChosenSkin[para1] = 59; }
    else if(PlayerInfo[para1][pMember] == 2) { PlayerInfo[para1][pTeam] = 6; ChosenSkin[para1] = 121; }
    else if(PlayerInfo[para1][pMember] == 3) { PlayerInfo[para1][pTeam] = 7; ChosenSkin[para1] = 98; }
    else if(PlayerInfo[para1][pMember] == 4) { PlayerInfo[para1][pTeam] = 8; ChosenSkin[para1] = 46; }
    else if(PlayerInfo[para1][pMember] == 5) { PlayerInfo[para1][pTeam] = 9; ChosenSkin[para1] = 174; }
    else if(PlayerInfo[para1][pMember] == 6) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 280; }
    else if(PlayerInfo[para1][pMember] == 7) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 164; }
    else if(PlayerInfo[para1][pMember] == 8) { PlayerInfo[para1][pTeam] = 10; ChosenSkin[para1] = 186; }
    else { return 1; }
    SetPlayerInterior(para1,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(para1);
    SelectChar[para1] = 255;
    SelectCharID[para1] = PlayerInfo[para1][pMember];
    SelectCharPlace[para1] = 1;
    PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
    SendClientMessage(para1, COLOR_LIGHTRED, "* Tipp 'weiter' um einen anderen Skin zu wählen.");
    SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den Richtigen gefunden hast, tipp 'fertig'.");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!");
    }
    }
    return 1;

  • if(strcmp(cmd, "/forceskin", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " /forceskin [playerid]");
    return 1;
    }
    new para1;
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pLeader] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[para1][pMember] < 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist in keiner Fraktion!");
    return 1;
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du wurdest von Admin %s gezwungen deinen Skin zu wechseln.", sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du hast %s gezwungen den Skin zu wechseln.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    if(PlayerInfo[para1][pMember] == 1) { PlayerInfo[para1][pTeam] = 5; ChosenSkin[para1] = 59; }
    else if(PlayerInfo[para1][pMember] == 2) { PlayerInfo[para1][pTeam] = 6; ChosenSkin[para1] = 121; }
    else if(PlayerInfo[para1][pMember] == 3) { PlayerInfo[para1][pTeam] = 7; ChosenSkin[para1] = 98; }
    else if(PlayerInfo[para1][pMember] == 4) { PlayerInfo[para1][pTeam] = 8; ChosenSkin[para1] = 46; }
    else if(PlayerInfo[para1][pMember] == 5) { PlayerInfo[para1][pTeam] = 9; ChosenSkin[para1] = 174; }
    else if(PlayerInfo[para1][pMember] == 6) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 280; }
    else if(PlayerInfo[para1][pMember] == 7) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 164; }
    else if(PlayerInfo[para1][pMember] == 8) { PlayerInfo[para1][pTeam] = 10; ChosenSkin[para1] = 186; }
    else { return 1; }
    SetPlayerInterior(para1,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(para1);
    SelectChar[para1] = 255;
    SelectCharID[para1] = PlayerInfo[para1][pMember];
    SelectCharPlace[para1] = 1;
    PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
    SendClientMessage(para1, COLOR_LIGHTRED, "* Tipp 'weiter' um einen anderen Skin zu wählen.");
    SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den Richtigen gefunden hast, tipp 'fertig'.");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!");
    }
    }
    return 1;
    }


    Es wird niemals so viel gelogen wie vor der Wahl, während des Krieges und nach der Jagd.

    - Otto von Bismarck
    -

  • Habe gerade bemerkt das du es falsch verstanden hast .


    Damit meinte ich nicht das ein leader auch /forceskin machen kann sondern das ein admin den leader mit /forceskin den Skin wechseln lassen kann .... Geht das? hier nochmal /forceskin




    if(strcmp(cmd, "/forceskin", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " /forceskin [playerid]");
    return 1;
    }
    new para1;
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pLeader] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[para1][pMember] < 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist in keiner Fraktion!");
    return 1;
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du wurdest von Admin %s gezwungen deinen Skin zu wechseln.", sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du hast %s gezwungen den Skin zu wechseln.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    if(PlayerInfo[para1][pMember] == 1) { PlayerInfo[para1][pTeam] = 5; ChosenSkin[para1] = 59; }
    else if(PlayerInfo[para1][pMember] == 2) { PlayerInfo[para1][pTeam] = 6; ChosenSkin[para1] = 121; }
    else if(PlayerInfo[para1][pMember] == 3) { PlayerInfo[para1][pTeam] = 7; ChosenSkin[para1] = 98; }
    else if(PlayerInfo[para1][pMember] == 4) { PlayerInfo[para1][pTeam] = 8; ChosenSkin[para1] = 46; }
    else if(PlayerInfo[para1][pMember] == 5) { PlayerInfo[para1][pTeam] = 9; ChosenSkin[para1] = 174; }
    else if(PlayerInfo[para1][pMember] == 6) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 280; }
    else if(PlayerInfo[para1][pMember] == 7) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 164; }
    else if(PlayerInfo[para1][pMember] == 8) { PlayerInfo[para1][pTeam] = 10; ChosenSkin[para1] = 186; }
    else { return 1; }
    SetPlayerInterior(para1,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(para1);
    SelectChar[para1] = 255;
    SelectCharID[para1] = PlayerInfo[para1][pMember];
    SelectCharPlace[para1] = 1;
    PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
    SendClientMessage(para1, COLOR_LIGHTRED, "* Tipp 'weiter' um einen anderen Skin zu wählen.");
    SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den Richtigen gefunden hast, tipp 'fertig'.");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!");
    }
    }
    return 1;
    }

  • if(strcmp(cmd, "/forceskin", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " /forceskin [playerid]");
    return 1;
    }
    new para1;
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[para1][pMember] < 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist in keiner Fraktion!");
    return 1;
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du wurdest von Admin %s gezwungen deinen Skin zu wechseln.", sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du hast %s gezwungen den Skin zu wechseln.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    if(PlayerInfo[para1][pMember] == 1 || PlayerInfo[para1][pLeader] == 1) { PlayerInfo[para1][pTeam] = 5; ChosenSkin[para1] = 59; }
    else if(PlayerInfo[para1][pMember] == 2 || PlayerInfo[para1][pLeader] == 2) { PlayerInfo[para1][pTeam] = 6; ChosenSkin[para1] = 121; }
    else if(PlayerInfo[para1][pMember] == 3 || PlayerInfo[para1][pLeader] == 3) { PlayerInfo[para1][pTeam] = 7; ChosenSkin[para1] = 98; }
    else if(PlayerInfo[para1][pMember] == 4 || PlayerInfo[para1][pLeader] == 4) { PlayerInfo[para1][pTeam] = 8; ChosenSkin[para1] = 46; }
    else if(PlayerInfo[para1][pMember] == 5 || PlayerInfo[para1][pLeader] == 5) { PlayerInfo[para1][pTeam] = 9; ChosenSkin[para1] = 174; }
    else if(PlayerInfo[para1][pMember] == 6 || PlayerInfo[para1][pLeader] == 6) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 280; }
    else if(PlayerInfo[para1][pMember] == 7 || PlayerInfo[para1][pLeader] == 7) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 164; }
    else if(PlayerInfo[para1][pMember] == 8 || PlayerInfo[para1][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; ChosenSkin[para1] = 186; }
    else { return 1; }
    SetPlayerInterior(para1,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(para1);
    SelectChar[para1] = 255;
    SelectCharID[para1] = PlayerInfo[para1][pMember];
    SelectCharPlace[para1] = 1;
    PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
    SendClientMessage(para1, COLOR_LIGHTRED, "* Tipp 'weiter' um einen anderen Skin zu wählen.");
    SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den Richtigen gefunden hast, tipp 'fertig'.");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!");
    }
    }
    return 1;
    }


    Es wird niemals so viel gelogen wie vor der Wahl, während des Krieges und nach der Jagd.

    - Otto von Bismarck
    -