Hallo ich versuche gerade ein Rennen zu machen aber es klappt nicht so ganz:
if (strcmp("/beginner", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,-2457.9744,-110.4660,25.9867);
SetPlayerRaceCheckpoint(playerid, 1, -2446.8931,-86.8839,34.1725,-2457.5818,-85.8853,42.1875, 2); /* Renncheckpoint mit Pfeil zum nächsten Checkpoint */
RaceCheckpoint[playerid] = 1;
if(RaceCheckpoint[playerid] == 3){
SendClientMessageToAll(0xFF6347AA, "hat den beginner Parcour geschafft!");
return 1;
}
return 1;
}
if(RaceCheckpoint[playerid] == 1)
{
switch(RaceCheckpoint[playerid])
{
case 1:
{
SetPlayerRaceCheckpoint(playerid,1,-2457.5818,-85.8853,42.1875,-2487.3667,-87.6387,39.1798,2);
RaceCheckpoint[playerid] = 2;
}
case 2:
{
RaceCheckpoint[playerid] == 2;
SetPlayerRaceCheckpoint(playerid,1,-2487.3667,-87.6387,39.1798,-2477.2505,-114.9111,39.1798,2);
RaceCheckpoint[playerid] = 3;
}
case 3:
{
DisablePlayerCheckpoint(playerid);
RaceCheckpoint[playerid] = 0;
return 1;
}
}
}
Es kommen keine Errors nur ein Warning:
:\Users\Michael\Desktop\GTA San Andreas\samp03asvr_R4_win32\gamemodes\new.pwn(212) : warning 215: expression has no effect
Und zwar in
RaceCheckpoint[playerid] == 2;
Man kann in den ersten Checkpoint rein, der verschwindet, aber beim 2ten gehts dann halt nicht mehr :O