Hi,
ich habe ein kleines Problem mit dem script und kriege ihn nicht behoben. Kann mir bitte jemand helfen?
#include <a_samp>
#define COLOR_TEMP 0xFFFFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_DARKGREEN 0x00721CFF
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF8000FF
#define COLOR_CREAM 0xF8BD6DFF
#define COLOR_SILVER 0xC0C0C0FF
#define COLOR_TEAL 0x00FFFFFF
#define COLOR_BERG 0x804040FF
#define COLOR_PINK 0xFF66FFAA
#define COLOR_SPEW 0x808040FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_PURPLE 0x400080FF
#define COLOR_COPPER 0x804000FF
#define COLOR_RAREZ 0x06A7B9FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_DARKRED 0xAA3333AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_BLACK 0x000000AA
#define COLOR_TURQ 0x00A3C0AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_BLACK 0x000000AA
#define COLOR_TURQ 0x00A3C0AA
public OnFilterScriptInit()
{
print("\n--------10.12.08--------");
print("Markus Filterscript");
print("--------English----------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/afk",true)==0)
{
if(isafk[playerid]=== 0)
{
isafk[playerid]= 1;
TogglePlayerControllable(playerid,false);
SetCameraBehindPlayer(playerid);
new string[256];
new name[128];
GetPlayerName(playerid,name,128);
format(string,sizeof(string),"%s is now Afk",name);
new setname[16];
format(setname,sizeof(setname),"%s[Afk]",name);
if(!strlen(name[11]))
{
afktag[playerid]= 1;
SetPlayerName(playerid,setname);
}
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
SendClientMessage(playerid,COLOR_GREEN,"Type /back when you are back!");
}
else
{
return SendClientMessage(playerid,COLOR_RED,"You are already Afk!");
}
return 1;
}
if(strcmp(cmdtext,"/back,true)==0)
{
if(isafk[playerid]=== 1)
{
isafk[playerid]= 0;
TogglePlayerControllable(playerid,true);
SetCameraBehindPlayer(playerid);
new string[128];
new name[16];
GetPlayerName(playerid,name,16);
new pname[16];
GetPlayerName(playerid,pname,16);
strdel(pname,strlen(pname)-5, strlen(pname));
if(afktag[playerid]=== 1)
{
afktag[playerid]= 0;
SetPlayerName(playerid,pname);
}
new name2[16]
GetPlayerName(playerid,name2,16);
format(string,sizeof(string),"%s is now back",name2);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
SendClientMessage(playerid,COLOR_GREEN,"Type /afk to go Afk again!");
}
else
{
return SendClientMessage(playerid,COLOR_RED,"You are not Afk!");
}
return 1;
}
return 0;
}
ERRORS:
C:\Dokumente und Einstellungen\Markus Schneider\Desktop\commands_and_more.pwn(63) : error 017: undefined symbol "isafk"
C:\Dokumente und Einstellungen\Markus Schneider\Desktop\commands_and_more.pwn(63) : warning 215: expression has no effect
C:\Dokumente und Einstellungen\Markus Schneider\Desktop\commands_and_more.pwn(63) : error 001: expected token: ";", but found "]"
C:\Dokumente und Einstellungen\Markus Schneider\Desktop\commands_and_more.pwn(63) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Markus Schneider\Desktop\commands_and_more.pwn(63) : fatal error 107: too many error messages on one line
Bitte um Hilfe
MfG Maggi