new CP0;
new CP1;
new CP2;
new CP3;
new CP4;
new CP5;
new CP6;
new CP7;
CP0 = CreateDynamicRaceCP(0, -2018.7242,924.6336,45.1436, -2087.2236,930.4537,68.7196, 10.0, -1, -1, playerid, 1000000.0);// in the command
public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 522)
{
if(checkpointid == CP0)
{
DestroyDynamicRaceCP(CP0);
GameTextForPlayer(playerid, "~r~1/8", 5000, 3);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
CP1 = CreateDynamicRaceCP(0, -2087.2236,930.4537,68.7196, -2142.8618,919.0911,79.4255, 10.0, -1, -1, playerid, 1000000.0);
return 1;
}
if(checkpointid == CP1)
{
DestroyDynamicRaceCP(CP1);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~r~2/8", 5000, 3);
CP2 = CreateDynamicRaceCP(0, -2142.8618,919.0911,79.4255, -2037.5515,1175.8153,44.8528, 10.0, -1, -1, playerid, 1000000.0);
return 1;
}
if(checkpointid == CP2)
{
DestroyDynamicRaceCP(CP2);
GameTextForPlayer(playerid, "~r~3/8", 5000, 3);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
CP3 = CreateDynamicRaceCP(0, -2037.5515,1175.8153,44.8528, -1966.5742,1104.3687,55.0706, 10.0, -1, -1, playerid, 1000000.0);
return 1;
}
if(checkpointid == CP3)
{
DestroyDynamicRaceCP(CP3);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~r~4/8", 5000, 3);
CP4 = CreateDynamicRaceCP(0, -1966.5742,1104.3687,55.0706, -1884.3412,1053.7308,44.8704, 10.0, -1, -1, playerid, 1000000.0);
return 1;
}
if(checkpointid == CP4)
{
DestroyDynamicRaceCP(CP4);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~r~5/8", 5000, 3);
CP5 = CreateDynamicRaceCP(0, -1884.3412,1053.7308,44.8704, -1902.6556,924.7991,34.5872, 10.0, -1, -1, playerid, 1000000.0);
return 1;
}
if(checkpointid == CP5)
{
DestroyDynamicRaceCP(CP5);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~r~6/8", 5000, 3);
CP6 = CreateDynamicRaceCP(0, -1902.6556,924.7991,34.5872, -1984.4913,941.0320,45.0158, 10.0, -1, -1, playerid, 1000000.0);
return 1;
}
if(checkpointid == CP6)
{
DestroyDynamicRaceCP(CP6);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~r~7/8", 5000, 3);
CP7 = CreateDynamicRaceCP(0, -1984.4913,941.0320,45.0158, -1884.3412,1053.7308,44.8704,10.0, -1, -1, playerid, 1000000.0);
return 1;
}
if(checkpointid == CP7)
{
DestroyDynamicRaceCP(CP7);
GameTextForPlayer(playerid,"You Won The Race",5000,3);
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
return 1;
}
}
return 1;
}
if(checkpointid == CP0 [ playerid ] )
{
DestroyDynamicRaceCP(CP0 [ playerid ]);
GameTextForPlayer(playerid, "~r~1/8", 5000, 3);
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
CP1 [ playerid ] = CreateDynamicRaceCP(0, -2087.2236,930.4537,68.7196, -2142.8618,919.0911,79.4255, 10.0, -1, -1, playerid, 1000000.0);
return 1;
}
convert the variables for player variabile:
ex pawn Код:
|
Well
From what i understand, when a player enters checkpoint it disappears only for that player and it shows him second checkpoint, but for other players the first checkpoint will still be visible. Is that what you want? |