08.06.2016, 16:07
When i enter NewsCP[1] it keep giving me the same checkpoint it won't move on to number 2.
PHP код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == NewsCP[0])
{
DestroyDynamicCP(NewsCP[0]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[1] = CreateDynamicCP(1910.5698,-1127.7013,24.3153,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[1])
{
DestroyDynamicCP(NewsCP[1]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[2] = CreateDynamicCP(1922.7101,-1127.5437,24.6200,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[2])
{
DestroyDynamicCP(NewsCP[2]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[3] = CreateDynamicCP(1935.3966,-1127.6398,24.9208,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[3])
{
DestroyDynamicCP(NewsCP[3]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[4] = CreateDynamicCP(1955.3051,-1127.9552,25.4240,3, -1, -1, playerid, 100.0);
return 1;
}
if(checkpointid == NewsCP[4])
{
DestroyDynamicCP(NewsCP[4]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[5] = CreateDynamicCP(1999.3730,-1129.3199,25.0862,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[5])
{
DestroyDynamicCP(NewsCP[5]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[6] = CreateDynamicCP(2023.0809,-1128.4589,24.4188,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[6])
{
DestroyDynamicCP(NewsCP[6]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[7] = CreateDynamicCP(2052.1731,-1127.4674,23.5879,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[7])
{
DestroyDynamicCP(NewsCP[7]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[8] = CreateDynamicCP(2077.6431,-1122.7905,23.6244,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[8])
{
DestroyDynamicCP(NewsCP[8]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[9] = CreateDynamicCP(2350.9204,-1162.5967,26.9414, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[9])
{
DestroyDynamicCP(NewsCP[9]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[10] = CreateDynamicCP(2366.5081,-1197.6523,26.9864,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[10])
{
DestroyDynamicCP(NewsCP[10]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[11] = CreateDynamicCP(2376.5500,-1275.7950,23.5722,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[11])
{
DestroyDynamicCP(NewsCP[11]);
SendServerMessage(playerid, "Go to the next checkpoint");
NewsCP[12] = CreateDynamicCP(2378.4927,-1325.7792,23.5584,3, -1, -1, playerid, 500.0);
return 1;
}
if(checkpointid == NewsCP[12])
{
DestroyDynamicCP(NewsCP[12]);
GivePlayerMoney(playerid, 90);
GameTextForPlayer(playerid, "~p~ You delivered all papers, you got ~r~90$ ~p~for that", 3000, 4);
SetPVarInt(playerid, "DeliveringNP", 0);
return 1;
}
return 1;
}