Hey, Ich habe ein Problem: Ich bekomme folgende Fehler:
D:\Script - 2013\gamemodes\MVD-Roleplay.pwn(33640) : error 028: invalid subscript (not an array or too many subscripts): "unsterblich"D:\Script - 2013\gamemodes\MVD-Roleplay.pwn(33640) : warning 215: expression has no effectD:\Script - 2013\gamemodes\MVD-Roleplay.pwn(33640) : error 001: expected token: ";", but found "]"D:\Script - 2013\gamemodes\MVD-Roleplay.pwn(33640) : error 029: invalid expression, assumed zeroD:\Script - 2013\gamemodes\MVD-Roleplay.pwn(33640) : fatal error 107: too many error messages on one line
Forward und Public:
forward unsterblich(playerid);
public unsterblich(playerid)
{
SetPlayerHealth(playerid, 9999);
SetPlayerArmour(playerid, 9999);
SetVehicleHealth(GetPlayerVehicleID(playerid), 10000.0);
return 1;
}
Befehl:
if(strcmp(cmd, "/adminduty", true)==0 strcmp(cmd, "/aod", true)==0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du musst eingeloggt sein !");
return 1;
}
if(SpielerInfo[playerid][pAdmin] >= 1)
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerArmour(playerid, 99999);
SetPlayerHealth(playerid, 99999);
SetPlayerColor(playerid, 0xC46F3585);
unsterblich[playerid] = SetTimerEx("unsterblich", 2000, true,"i",playerid);
SendClientMessageToAll(COLOR_YELLOW,"Ein Teammitglied geht nun in den Dienst");
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
KillTimer(unsterblich[playerid]);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_YELLOW,"Ein Teammitglied ist aus den Dienst gegangen");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist kein Teammitglied!");
return 1;
}
}
return 1;
}