Hallo ich habe mehrere checkpoints erstellt aer mein problem ist wen ich in den ersten checkpoint reinfahre müste der verschwinden und dan den nächsten chacpoint anzeigen aber das macht der nicht der erste checkpoint verschwindet nicht was habe ich den falsch gemacht??
Hier ist meine pwn:
#include <a_samp>
#include <a_samp>
#pragma tabsize 0
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
// Bushaltestelle
CreateObject(1257, 1535.677856, -1695.709961, 13.826067, 0.0000, 0.0000, 0.0000);
CreateObject(1257, 1481.327515, -1738.398926, 13.826067, 0.0000, 0.0000, 270.0000);
CreateObject(1257, 1162.799194, -1858.376587, 13.840400, 0.0000, 0.0000, 270.0000);
CreateObject(1257, 394.170258, -1778.650879, 5.861780, 0.0000, 0.0000, 270.0000);
CreateObject(1257, 531.009827, -1241.735962, 16.896696, 0.0000, 0.0000, 125.4689);
CreateObject(1257, 1006.253418, -952.070862, 42.484543, 0.0000, 0.0000, 96.0934);
CreateObject(1257, 1187.583862, -932.559082, 43.236420, 0.0000, 0.0000, 98.6717);
CreateObject(1257, 1815.355591, -1679.346436, 13.826068, 0.0000, 0.0000, 180.0000);
CreateObject(1257, 1955.373047, -2144.854736, 13.826067, 0.0000, 0.0000, 180.0000);
CreateObject(1257, 2754.971680, -2458.658447, 13.922378, 0.0000, 0.0000, 180.0000);
CreateObject(1257, 1681.583496, -2325.312744, 13.826067, 0.0000, 0.0000, 270.0001);
CreateObject(1257, 2144.249023, -1100.726196, 25.283672, 0.0000, 0.0000, 249.2189);
CreateObject(1257, 2425.033203, -1466.384521, 24.279192, 0.0000, 0.0000, 180.0000);
CreateObject(1257, 2790.943115, -1329.294556, 32.904530, 347.1084, 359.1406, 180.0000);
CreateObject(1257, 2851.615479, -1958.905396, 11.385170, 0.0000, 0.0000, 180.0000);
CreateObject(1257, 1460.892212, -1027.792358, 24.107317, 0.0000, 0.0000, 90.0000);
CreateObject(1257, -104.771576, -1162.431030, 2.850914, 0.0000, 0.0000, 337.5000);
CreateObject(1257, -2027.226074, -64.088860, 35.599503, 0.0000, 0.0000, 90.0000);
print("\n--------------------------------------");
print(" PD tor Filterscript by BoNeS");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new CP[MAX_PLAYERS];
if(strcmp(cmd, "/bus", true) == 0)
{
if(IsPlayerConnected(playerid))
{
CP[playerid] = 1;
SetPlayerCheckpoint(playerid, 1162.8475,-1855.9469,13.1052,4.0);//8.0 = größe des checkpoint// da die kooord wo der erste checkpint gesetzt wird
{
}
}
}//not connected
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
new CP[MAX_PLAYERS];
if(CP[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 2;
SetPlayerCheckpoint(playerid, 1162.8475,-1855.9469,13.1052,4.0);
}
else if(CP[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 3;
SetPlayerCheckpoint(playerid, 1481.1099,-1736.0990,13.0899,4.0);
}
else if(CP[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 4;
SetPlayerCheckpoint(playerid, 1533.2006,-1696.1423,13.0900,4.0);
}
else if(CP[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 5;
SetPlayerCheckpoint(playerid, 1817.9635,-1679.0994,13.0899,4.0);
}
else if(CP[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 6;
SetPlayerCheckpoint(playerid, 1958.0376,-2144.7598,13.0897,4.0);
}
else if(CP[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 7;
SetPlayerCheckpoint(playerid, 2757.4810,-2458.4441,13.1878,4.0);
}
else if(CP[playerid] == 7)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 8;
SetPlayerCheckpoint(playerid, 1681.3975,-2322.8298,13.0893,4.0);
}
else if(CP[playerid] == 8)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 9;
SetPlayerCheckpoint(playerid, 1461.3259,-1030.4270,23.5509,4.0);
}
else if(CP[playerid] == 9)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 10;
SetPlayerCheckpoint(playerid, 1188.0732,-935.1434,42.6420,4.0);
}
else if(CP[playerid] == 10)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 11;
SetPlayerCheckpoint(playerid, 1006.5040,-954.5300,41.7557,4.0);
}
else if(CP[playerid] == 11)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 12;
SetPlayerCheckpoint(playerid, 532.6796,-1243.4473,16.3636,4.0);
}
else if(CP[playerid] == 12)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 13;
SetPlayerCheckpoint(playerid, 394.2182,-1776.1411,5.2612,4.0);
}
else if(CP[playerid] == 13)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 14;
SetPlayerCheckpoint(playerid, -107.0344,-1161.7087,2.2304,4.0);
}
else if(CP[playerid] == 14)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 15;
SetPlayerCheckpoint(playerid, -2027.2339,-66.4080,35.0660,4.0);
}
else if(CP[playerid] == 15)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 16;
SetPlayerCheckpoint(playerid, 2144.9521,-1098.2050,24.5191,4.0);
}
else if(CP[playerid] == 16)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 17;
SetPlayerCheckpoint(playerid, 2427.1785,-1466.5867,23.5332,4.0);
}
else if(CP[playerid] == 17)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 18;
SetPlayerCheckpoint(playerid, 2793.2415,-1329.4501,32.1613,4.0);
}
else if(CP[playerid] == 18)
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~Checkoint erreicht!", 2500, 1);
CP[playerid] = 0;
SetPlayerCheckpoint(playerid, 2854.1821,-1959.1376,10.6437,4.0);
}
return 1;
}