/accept invite im gf

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
  • guten tag,
    könntet ihr mir helfen im gf das es so ist wenn ein leader jemanden invitet er nicht dirtekt drinne ist sondern man es als user erst mit /accept invite akzepttieren muss


    könntet ihr mir bitte dabei helfen

  • Bei /invite dem Inviteten eine Variable auf 1 setzen.


    Diese Variable bei /accept invite abfragen.



    Wenn du etwas nicht verstehst, einfach posten ;)

    Unkompetent. Das neue dynamisch.



    ihr seit schon lustig postet erros aber nicht die zeilen wo sie sind dann können wir euch auch nicht helfen^^


    Lernt Scripten, Leute, und macht eure Augen auf!


    _______________________________________
    50 Beiträge: [x] 300 Beiträge: [x]
    100 Beiträge: [x] 500 Beiträge: [x]
    150 Beiträge: [x] 1000 Beiträge: [x]
    200 Beiträge: [x]
    2000 Beiträge: []
    250 Beiträge: [X] Boardaktivitäten: Profil


    [size=36]_______________________________________

    /Edit: Schmerzt es dir eigentlich nicht so ein Müll zu schreiben 8|

  • bin anfänger habe keine richtige ahnung hier meine /invite schnipsel
    if(strcmp(cmd, "/invite", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /invite [playerid/PartOfName]");
    return 1;
    }
    new para1;
    new ftext[25];
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pLeader] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
    if(PlayerInfo[para1][pJob] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat einen Job !");
    return 1;
    }
    if(RequestJobMoney[para1]==1)
    {
    SendClientMessage(para1, COLOR_GREY, "Du hast nun einen Job, und dein Arbeitslosengeld ist gekündigt.");
    RequestJobMoney[para1]=0;
    }
    if(PlayerInfo[para1][pJobLock] >= 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du kannst ihn nicht inviten, der Spieler hat Jobsperre !");
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medic"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
    else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
    else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "21st Street"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115); }
    else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
    else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
    else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Unternehmen"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Fahrschule"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
    else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove Street Family"; ChosenSkin[para1] = 107; SetPlayerSkin(para1, 107); }
    else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 122; SetPlayerSkin(para1, 122); }
    else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "ADAC"; ChosenSkin[para1] = 50; SetPlayerSkin(para1, 50); PlayerInfo[para1][pJob] = 7; }
    else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Transporter"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
    else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Special Force"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Terroristen"; ChosenSkin[para1] = 142; SetPlayerSkin(para1, 142); }
    else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "San Trans"; ChosenSkin[para1] = 128; SetPlayerSkin(para1, 128); PlayerInfo[para1][pJob] = 16;}
    else { return 1; }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
    PlayerInfo[para1][pRank] = 1;
    printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);
    format(string, sizeof(string), "Du bist der Fraktion %s beigetreten. Leader %s hat dich eingeladen.", ftext, sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "Du hast %s in die Fraktion %s eingeladen.", giveplayer,ftext);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    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]);
    TogglePlayerControllable(para1, 0);
    SelectChar[para1] = 255;
    SelectCharID[para1] = PlayerInfo[para1][pMember];
    SelectCharPlace[para1] = 1;
    PlayerInfo[para1][pJob] = 0;
    new month2, day2;
    getdate(year, month2, day2);
    PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
    PlayerInfo[para1][pJobInvite] = 1;
    PlayerInfo[para1][pJobInviteDate] = day2;
    PlayerInfo[para1][pJobInviteMonth] = month2;
    SendClientMessage(para1, COLOR_LIGHTRED, "* Benutze 'next' um den Character auszuwählen den du benutzen willst.");
    SendClientMessage(para1, COLOR_LIGHTRED, "* Wen du den richtigen gefunden hast, gib 'done' ein.");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted / a Different Team / or already a Family Member.");
    return 1;
    }
    }
    }//not connected
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Leader einer Fraktion.");
    }
    }
    return 1;
    }

  • Jetzt machst du oben wo deine "new"'s sind, einfach ein new Invitefrak[MAX_PLAYERS] = 0;.


    Weiter, dein /invite machst du zu dem:

    if(strcmp(cmd, "/invite", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /invite [playerid/PartOfName]");
    return 1;
    }
    new para1;
    new ftext[25];
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pLeader] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
    if(PlayerInfo[para1][pJob] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat einen Job !");
    return 1;
    }
    if(RequestJobMoney[para1]==1)
    {
    SendClientMessage(para1, COLOR_GREY, "Du hast nun einen Job, und dein Arbeitslosengeld ist gekündigt.");
    RequestJobMoney[para1]=0;
    }
    if(PlayerInfo[para1][pJobLock] >= 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du kannst ihn nicht inviten, der Spieler hat Jobsperre !");
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medic"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
    else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
    else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "21st Street"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115); }
    else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
    else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
    else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Unternehmen"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Fahrschule"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
    else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove Street Family"; ChosenSkin[para1] = 107; SetPlayerSkin(para1, 107); }
    else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 122; SetPlayerSkin(para1, 122); }
    else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "ADAC"; ChosenSkin[para1] = 50; SetPlayerSkin(para1, 50); PlayerInfo[para1][pJob] = 7; }
    else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Transporter"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
    else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Special Force"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Terroristen"; ChosenSkin[para1] = 142; SetPlayerSkin(para1, 142); }
    else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "San Trans"; ChosenSkin[para1] = 128; SetPlayerSkin(para1, 128); PlayerInfo[para1][pJob] = 16;}
    else { return 1; }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    Invitefrak[para1] = PlayerInfo[playerid][pLeader];
    printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);
    format(string, sizeof(string), "%s hat dich in die Fraktion %s eingeladen.", sendername, ftext); SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    SendClientMessage(para1, COLOR_LIGHTBLUE, "Du kannst die Einladung mit \"/accept invite\" annehmen.");
    format(string, sizeof(string), "Du hast %s in die Fraktion %s eingeladen.", giveplayer,ftext);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted / a Different Team / or already a Family Member.");
    return 1;
    }
    }
    }//not connected
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Leader einer Fraktion.");
    }
    }
    return 1;
    }


    Frag einen anderen, nach /accept Invite, er soll sich an diese Punkte halten.
    Ich muss jetzt off, sry X(

    Unkompetent. Das neue dynamisch.



    ihr seit schon lustig postet erros aber nicht die zeilen wo sie sind dann können wir euch auch nicht helfen^^


    Lernt Scripten, Leute, und macht eure Augen auf!


    _______________________________________
    50 Beiträge: [x] 300 Beiträge: [x]
    100 Beiträge: [x] 500 Beiträge: [x]
    150 Beiträge: [x] 1000 Beiträge: [x]
    200 Beiträge: [x]
    2000 Beiträge: []
    250 Beiträge: [X] Boardaktivitäten: Profil


    [size=36]_______________________________________

    /Edit: Schmerzt es dir eigentlich nicht so ein Müll zu schreiben 8|