Guten Tag ich habe AwayFromKeyBoard Defniert also in der Spielerdatei aber es Funktioniert immer noch
C:\Users\Zocker St\Desktop\German Perfect Roleplay\gamemodes\PerfectRP.pwn(601) : error 001: expected token: ")", but found "["
C:\Users\Zocker St\Desktop\German Perfect Roleplay\gamemodes\PerfectRP.pwn(601) : error 029: invalid expression, assumed zero
C:\Users\Zocker St\Desktop\German Perfect Roleplay\gamemodes\PerfectRP.pwn(601) : error 017: undefined symbol "AwayFromKeyBoard"
C:\Users\Zocker St\Desktop\German Perfect Roleplay\gamemodes\PerfectRP.pwn(601) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
/* Afk System */
if(strcmp(cmdtext,"/afk", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(SpielerInfo[playerid][AwayFromKeyBoard] == 0)
{
new AFKMODUS[MAX_PLAYER_NAME];
GetPlayerName(playerid, AFKMODUS, sizeof(AFKMODUS));
format(string, sizeof(string), "Spieler %s ist in den AFK-Modus gegangen !", AFKMODUS);
ProxDetector(30.0, playerid, string, COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED);
TextDrawShowForPlayer(playerid,AFKSCREEN);
TextDrawShowForPlayer(playerid,AFKDRAW);
format(string,sizeof(string),"AFK seit\n%02d:%02d:%02d Uhr",stunde,minute2,sekunde);
AFKLabel[playerid] = Create3DTextLabel(string,FARBE_LILA,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,0,1);
Attach3DTextLabelToPlayer(AFKLabel[playerid],playerid, 0.0, 0.0,0.45);
SendClientMessage(playerid,COLOR_WHITE,"Du befindest dich nun im AFK-Modus Tippe /AFK um aus dem AFK-Modus rauszugehen!");
SpielerInfo[playerid][AwayFromKeyBoard] = 1;
}
else if(SpielerInfo[playerid][AwayFromKeyBoard] == 1)
{
new AFKMODUS[MAX_PLAYER_NAME];
GetPlayerName(playerid, AFKMODUS, sizeof(AFKMODUS));
format(string, sizeof(string), "Spieler %s ist vom AFK-Modus Zurück gekommen!", AFKMODUS);
ProxDetector(30.0, playerid, string, COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED);
TextDrawHideForPlayer(playerid,AFKSCREEN);
TextDrawHideForPlayer(playerid,AFKDRAW);
TextDrawShowForPlayer(playerid,SERVERUHR);
Delete3DTextLabel(AFKLabel[playerid]);
SpielerInfo[playerid][AwayFromKeyBoard] = 0;
}
}
return 1;
}