11.06.2018, 14:36
Hi everybody !
I have a problem, I would make a stunt system with checkpoints but when I enter in the first checkpoint nothing happened here is my code :
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CPStunt[0] && gTeam[playerid] == TEAM_STUNTER)
{
CPStunt[1] = CreateDynamicCP(1958.5, 1964, 23.200000762939, 2, -1, -1, -1, 100.0);
TogglePlayerDynamicCP(playerid, CPStunt[0], 1);
}
if(checkpointid == CPStunt[1] && gTeam[playerid] == TEAM_STUNTER)
{
GivePlayerMoney(playerid, 5000);
TogglePlayerDynamicCP(playerid, CPStunt[0], 1);
DestroyDynamicCP(CPStunt[1]);
}
return 1;
}
Thanks in advance to help me !
I have a problem, I would make a stunt system with checkpoints but when I enter in the first checkpoint nothing happened here is my code :
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CPStunt[0] && gTeam[playerid] == TEAM_STUNTER)
{
CPStunt[1] = CreateDynamicCP(1958.5, 1964, 23.200000762939, 2, -1, -1, -1, 100.0);
TogglePlayerDynamicCP(playerid, CPStunt[0], 1);
}
if(checkpointid == CPStunt[1] && gTeam[playerid] == TEAM_STUNTER)
{
GivePlayerMoney(playerid, 5000);
TogglePlayerDynamicCP(playerid, CPStunt[0], 1);
DestroyDynamicCP(CPStunt[1]);
}
return 1;
}
Thanks in advance to help me !