Hi,
Ich hab mal das Checkpoint Tutorial angeschaut (kp. wie es in wirklichkeit heißt) und ein Grundgerüst geschrieben (mit den selben Kordinaten).
Hier erstmal der Code:
#define FILTERSCRIPT
#include <a_samp>
new bool:IsRace[MAX_PLAYERS];
new Status[MAX_PLAYERS];
#define MAX 17
new Float:race[MAX][3] = {
{1656.829956, -1166.398437, 23.617559},
{1707.867675, -1206.746826, 20.976793},
{1783.874511, -1286.020629, 13.275278},
{1859.596069, -1219.198364, 18.736469},
{1892.303710, -1127.870849, 24.013429},
{1907.985717, -1127.944580, 24.407924},
{1921.429077, -1127.915771, 24.743091},
{1957.571533, -1128.151611, 25.638833},
{1997.838745, -1128.968505, 25.293878},
{2029.990234, -1128.175903, 24.385658},
{2077.569824, -1122.709838, 23.775880},
{2079.989990, -1148.917846, 23.618659},
{2077.754882, -1167.527221, 23.524724},
{2077.924560, -1184.147338, 23.527599},
{2078.348388, -1203.702514, 23.650722},
{2089.319580, -1228.770019, 23.709350},
{1728.458129, -1055.661743, 23.505249}
};
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Wettrenn Filterscript by Mike Iruobe");
print("--------------------------------------\n");
return 1;
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Filterscript von Mike Iruobet");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/beginrace", cmdtext, true, 10) == 0)
{
Status[playerid] = 0;
IsRace[playerid] = true;
SetPlayerRaceCheckpoint(playerid, 0, race[0][0], race[0][1], race[0][2], race[1][0], race[1][1], race[1][2]);
return 1;
}
return 0;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
Status[playerid]++;
new last = MAX;
if(Status[playerid] == last) {
DisablePlayerRaceCheckpoint(playerid);
SendClientMessage(playerid, 0xFFFFFF, "Du hast das Rennen bestanden!");
} else if(Status[playerid] < last) {
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, race[Status[playerid]][0], race[Status[playerid]][1], race[Status[playerid]][2], race[Status[playerid] + 1][0], race[Status[playerid] +1][1], race[Status[playerid] + 1][2]);
SendClientMessage(playerid, 0xFFFFFF, "Ab zum nächsten CheckPoint!");
}
return 1;
}
Joa er zeigt mir aber 4 Fehler an, die ich mir nicht erklären kann.
ZitatAlles anzeigenC:\Users\Mike\Desktop\Gtap\filterscripts\Rennen.pwn(92) : error 017: undefined symbol "Status"
C:\Users\Mike\Desktop\Gtap\filterscripts\Rennen.pwn(92) : warning 215: expression has no effect
C:\Users\Mike\Desktop\Gtap\filterscripts\Rennen.pwn(92) : error 001: expected token: ";", but found "]"
C:\Users\Mike\Desktop\Gtap\filterscripts\Rennen.pwn(92) : error 029: invalid expression, assumed zero
C:\Users\Mike\Desktop\Gtap\filterscripts\Rennen.pwn(92) : 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.
Kann mir da wer helfen? Wäre echt nett.
Mfg
Mike_progger