Hallo ich habe ein problem und zwar funzt das nicht so wie es sollte :#define FILTERSCRIPT
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new bool:killer[MAX_PLAYERS];
new killer[MAX_PLAYERS];
new spieler[32][0] = {
{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
{17}, {18}, {19}, {20}, {21},{22}, {23}, {24}, {25}, {26},{27}, {28}, {29}, {30}, {31}, {32}
};
forward AuftragsKiller(playerid);
public OnFilterScriptInit()
{
printf("\n--------------------------------------");
printf(" HITMAN ");
printf("--------------------------------------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new bool:killer[MAX_PLAYERS];
new killer[MAX_PLAYERS];
new spieler[32][0] = {
{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
{17}, {18}, {19}, {20}, {21},{22}, {23}, {24}, {25}, {26},{27}, {28}, {29}, {30}, {31}, {32}
};
if(strcmp(cmd, "/killer ", true) == 0)
{
if(killer[playerid] == 0)
{
AuftragsKiller(playerid);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du hast bereits einen auftrag!");
}
return 1;
}
public AuftragsKiller(playerid)
{
newrandom:
new typ=random(sizeof(spieler));
new typ2=spieler[typ][0];
if(IsPlayerConnected(typ2))
{
new str[126];
new name[MAX_PLAYER_NAME];
GetPlayerName(typ2, name, sizeof(name));
format(str, sizeof(str), " Du musst %s killen!", name);
SendClientMessage(playerid, COLOR_YELLOW, str);
killer[playerid] = typ 1;
zielperson[playerid] = typ 2;
}
else goto newrandom;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killer[killerid])
{
if(playerid == zielperson[killerid])
{
killer[killerid] = 0;
GivePlayerMoney(killerid, 5000);
SendClientMessage(killerid, GREEN, "Du hast die Zielperson ausgeschaltet und hast 5000$ bekommen.");
}
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
for(new i=0; i
{
killer[i] = 0;
SendClientMessage(i, 0xFFFFFFFF, "Deine Zielperson ist vom Server gegangen. Du kannst einen neuen Auftrag annehmen.");
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
Kann mir einer sagen wieso?