Hallo Breadfish,
Ich habe mir gerade einen ocmd befehl erstellt, der sich mit /makeleader deklariert. Nun, wenn ich z.B. mache, /makeleader 0 1 [0 = playerid, 1= Fraktionsid, (LSPD) ] dann steht da nur die ganze Zeit:
Admin ... hat dich zum Leader der Fraktion Zivilisten ernannt. Obwohl 1 LSPD ist...
Hier mein gemachtes /makeleader Befehl
ocmd:makeleader(playerid,params[])
{
if(IsPlayerAnAdmin(playerid,1337))
{
new pID,fID;
new string[128],fraktname[64];
new sendername[MAX_PLAYER_NAME],customer[MAX_PLAYER_NAME];
if(sscanf(params,"ui",pID,fID))
{
SendClientMessage(playerid,COLOR_GELB,"Benutze: /makeleader [playerid] [1-29]");
SendClientMessage(playerid,COLOR_GRAD1,"1: LSPD | 2: FBI | 3: Bundeswehr | 4: Medic | 5: Ordnungsamt | 6: Feuerwehr | 7: Regierung");
SendClientMessage(playerid,COLOR_GRAD1,"8: Hitman | 9: Wheelmen | 10: Taxi | 11: Fahrlehrer | 12: CNN | 13: GS | 14: Ballas |");
SendClientMessage(playerid,COLOR_GRAD1,"15: Vagos | 16: Aztecas | 17: Rifas | 18: RS | 19: Yakuza | 20: LCN | 21: Terroristen");
SendClientMessage(playerid,COLOR_GRAD1,"22: Brigada | 23: Triaden | 24: Men Stillers | 25: Latino Kings | 26: Royal Flasher");
SendClientMessage(playerid,COLOR_GRAD1,"27: Hudson Dusters | 28: Rising Eagle | 29: Vatos Locos | 30: West Coast Customs");
}
else
{
if(IsPlayerConnected(pID))
{
if(GetPVarInt(pID,"pLoggedIn")==1)
{
if(fID < 0|| fID > 30)
{
SendClientMessage(playerid,COLOR_RED,"Diese Fraktion gibt es nicht.");
}
else
{
GetPlayerName(playerid,sendername,sizeof(sendername));
GetPlayerName(pID,customer,sizeof(customer));
SetPVarInt(pID,"pMember",fID);
SetPVarInt(pID,"pLeader",fID);
switch(fID)
{
case 0:{fraktname = "Zivilisten"; SetPlayerSkin(playerid,25);}
case 1:{fraktname = fraktname1; SetPlayerSkin(pID,285);}
case 2:{fraktname = fraktname2; SetPlayerSkin(pID,165);}
case 3:{fraktname = fraktname3; SetPlayerSkin(pID,286);}
}
format(string,sizeof(string),"Admin %s hat dich zum Leader der Fraktion %s ernannt.",sendername,fraktname);
SendClientMessage(pID,COLOR_LIGHTBLUE,string);
}
}
}
}
}
return 1;
}