HeyHoo,
Habe das Problem, dass wenn Ich InGame "/f test" eingebe, nur "Polizeipresident DJ_Deagle: " ankommt.
Pls help !
Hier der Befehl:
//Fraktionschat
ocmd:f(playerid,params[])
{
new result[128];
if(sscanf(params,"i",result))
{
new resultstring[128];
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
new member = GetPVarInt(playerid,"Fraktion");
{
if(member==1)
{
if(GetPVarInt(playerid,"frakrank") == 6) { format(resultstring, sizeof(resultstring), "Polizeipresident %s: %s", Name, result); }
else if(GetPVarInt(playerid,"frakrank") == 5) { format(resultstring, sizeof(resultstring), "Lieutnant %s: %s", Name, result); }
else if(GetPVarInt(playerid,"frakrank") == 4) { format(resultstring, sizeof(resultstring), "Kommissar %s: %s", Name, result); }
else if(GetPVarInt(playerid,"frakrank") == 3) { format(resultstring, sizeof(resultstring), "Bewährungshelfer : %s", Name, result); }
else if(GetPVarInt(playerid,"frakrank") == 2) { format(resultstring, sizeof(resultstring), "Officer %s: %s", Name, result); }
else if(GetPVarInt(playerid,"frakrank") == 1) { format(resultstring, sizeof(resultstring), "Cadet %s: %s", Name, result); }
}
for(new i=0, j = GetMaxPlayers(); i < j; i++)
{
if(GetPVarInt(playerid,"Fraktion") == GetPVarInt(playerid,"Fraktion") || GetPVarInt(playerid,"Leader") == GetPVarInt(playerid,"Leader"))
{
SendClientMessage(i, ChatGrün, resultstring);
}
}
}
}
return 1;
}
MfG
Deagle