Hallo ich möchte hier eine Frage stellen.
Es gibt ja /ainvite um jemanden als admin Member zu machen..
und ich wollte jetzt fragen ob man es so umändern kann das man damit leader machen kann ich hoffe ihr helft mir
Also Anstatt /ainvite für member
/alinivte für Leade inviten
if(strcmp(cmd, "/ainvite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /ainvite [Spieler ID / Name] [FraktionsNummer]");
SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 1 SFPD, 2 FBI, 3 Army, 4 Medic, 5 LCN, 6 Yakuza, 7 Präsi, 8 Hitman");
SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 9 San Andreas News, 10 Taxi, 11 Fahrlehrer, 12 Triaden, 13 Gs, 14 Ballas, 15 Hells Angels, 16 Vagos");
SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 17 Aztecas, 18 Rifas, 19 RS, 20 Terror, 22 SWAT, 23 Russische Mafia, 24 O-Amt 25 Camarro");
return 1;
}
new para1, fraktion, ftext[20];
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /ainvite [Spieler ID / Name] [FraktionsNummer]");
SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 1 SFPD, 2 FBI, 3 Army, 4 Medic, 5 LCN, 6 Yakuza, 7 Präsi, 8 Hitman");
SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 9 San Andreas News, 10 Taxi, 11 Fahrlehrer, 12 Triaden, 13 Gs, 14 Ballas, 15 Hells Angels, 16 Vagos");
SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 17 Aztecas, 18 Rifas, 19 RS, 20 Terror, 22 SWAT, 23 Russische Mafia, 24 O-Amt 25 Camarro");
return 1;
}
fraktion = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 3)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (gTeam[para1] == TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
{
if(fraktion == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "SFPD"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
else if(fraktion == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
else if(fraktion == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
else if(fraktion == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medic"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
else if(fraktion == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
else if(fraktion == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
else if(fraktion == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Bodyguards"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }
else if(fraktion == 8) { PlayerInfo[para1][pTeam] = 8; gTeam[para1] = 8; ftext = "Hitman Agency"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
else if(fraktion == 9) { PlayerInfo[para1][pTeam] = 9; gTeam[para1] = 9; ftext = "CNN Studio"; ChosenSkin[para1] = 187; SetPlayerSkin(para1, 187); }
else if(fraktion == 10) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Taxi Cab Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
else if(fraktion == 11) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 11; ftext = "School Instructors"; ChosenSkin[para1] = 240; SetPlayerSkin(para1, 240); }
else if(fraktion == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Triaden"; ChosenSkin[para1] = 118; SetPlayerSkin(para1, 118); }//Triaden
else if(fraktion == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Grove Street Family"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }//Grove Street
else if(fraktion == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Ballas"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 102); }//Ballas
else if(fraktion == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Hells Angels"; ChosenSkin[para1] = 185; SetPlayerSkin(para1, 185); }//Hells Angels Club
else if(fraktion == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Vagos"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }//Los Santos Vagos
else if(fraktion == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "Aztecas"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }//Varios Los Aztecas
else if(fraktion == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "Rifa"; ChosenSkin[para1] = 173; SetPlayerSkin(para1, 173); }//Los Santos Rifa
else if(fraktion == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "Red Soldiers"; ChosenSkin[para1] = 66; SetPlayerSkin(para1, 66); }//West Coust Customs
else if(fraktion == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Terror"; ChosenSkin[para1] = 220; SetPlayerSkin(para1, 220); }
else if(fraktion == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 21; ftext = "Wheelmen Agency"; ChosenSkin[para1] = 28; SetPlayerSkin(para1, 28); }
else if(fraktion == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 22; ftext = "SWAT"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
else if(fraktion == 23) { PlayerInfo[para1][pTeam] = 23; gTeam[para1] = 23; ftext = "Russische Mafia"; ChosenSkin[para1] = 133; SetPlayerSkin(para1, 223); }
else if(fraktion == 24) { PlayerInfo[para1][pTeam] = 24; gTeam[para1] = 24; ftext = "Ordnungsamt"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
else if(fraktion == 25) { PlayerInfo[para1][pTeam] = 25; gTeam[para1] = 25; ftext = "Camarro"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
else
{
SendClientMessage(playerid, COLOR_GRAD2, " FraktionsNummer ungültig! 1-24");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = fraktion;
PlayerInfo[para1][pRank] = 1;
printf("AdmCmd: %s hat %s in die Fraktion %s eingeladen.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Du wurdest in die Fraktion %s von Admin %s eingeladen.", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
SendClientMessage(para1, COLOR_GRAD5, " Du kannst mit /help deine neuen Fraktionsbefehle betrachten");
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]);
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, "* Benutze 'weiter' um dir den Charakter auszusuchen den du gerne benutzen möchtest.");
SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den richtigen gefunden hast gib 'fertig' ein.");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat zur Zeit ein Wanted / ist in einer anderen Fraktion / oder bereits ein Fraktionsmitglied.");
return 1;
}
}
}//not connected
}//not admin
}
return 1;
}
Bedanke mich im vorraus