Guten Tag Breadfish,
ich habe im Godfather gesehen, das es ein AFK System gibt aber wenn man z.B Ingame /afk oder /back eingibt, dann passiert nix.
Hier;
/* if(strcmp(cmd, "/afk", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerCuffed[playerid] >= 1 PlayerTied[playerid] == 1)
{
SendClientMessage(playerid,COLOR_GREY,"Du kannst jetzt nicht AFK gehen!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof string,"*~ [AFK] %s ist in den AFK-Modus gegangen! /afklist ",sendername);
SendClientMessageToAll(0xAFAFAFAA,string);
afk[playerid] = 1;
FreezePlayer(playerid);
new AFKTEXT[MAX_PLAYER_NAME]; //gleiche wie oben
AFKTEXT = "AFK-Modus";//gleiche wie oben
AFK3D[playerid] = Create3DTextLabel(AFKTEXT,COLOR_PURPLE,0,0,0,30.5,1);//gleiche wie oben
Attach3DTextLabelToPlayer(AFK3D[playerid], playerid, 0.0, 0.0, 0.45);//gleiche wie oben
return 1;
}
}
if(strcmp(cmd, "/back", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof string,"*~ [AFK] %s ist nun nicht mehr AFK!",sendername);
SendClientMessageToAll(0xAFAFAFAA,string);
UnFreezePlayer(playerid);
afk[playerid] = 0;
Delete3DTextLabel(AFK3D[playerid]);
return 1;
}
}
if(strcmp("/afklist",cmdtext,true) == 0)
{
new countafk = 0;
SendClientMessage(playerid,0x33AA33AA,"|---------------------- AFK-List -----------------------|");
for(new i=0; i {
if(IsPlayerConnected(i) && afk[i] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string,sizeof string,"* [AFK] %s",sendername);
SendClientMessage(playerid,0x33AA33AA,string);
countafk++;
}
}
if(countafk == 0) SendClientMessage(playerid,0x33AA33AA," Niemand ist AFK !");
SendClientMessage(playerid,0x33AA33AA,"|------------------------------------------------------|");
return 1;
*/
Da gibts auch keine Errors..