09.06.2012, 15:19
Hey guys, I am using checkpoint to entered building by example the bank:
I made like a street sweeper job with OnPlayerEnterRaceCheckpoint like this:
The problem is, when i am doing the command /sweep it show the race checkpoint perfectly but once im near the checkpoint of the entrance from the bank, it show this entrance on the map et the race checkpoint from the sweep job disapear... any idea ? hope someone will find an issue, thanks.
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == BankEntrance)
{
SetPlayerPos(playerid,2307.9602,-15.7342,26.7496);
SetPlayerFacingAngle(playerid,270.5396);
SetPlayerVirtualWorld(playerid,1);
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');
format(str, sizeof(str), "* %s has entered Bank of Downtown Roleplay.", pname);
ProxDetector(30.0, playerid, str, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE);
}
if(checkpointid == BankExit)
{
if(GetPlayerVirtualWorld(playerid) != 1)
{
}
else
{
SetPlayerPos(playerid,2435.1694,1652.7235,10.8203);
SetPlayerFacingAngle(playerid,182.1696);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');
format(str, sizeof(str),"* %s has exited the building.",pname);
ProxDetector(30.0, playerid, str, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE);
}
}
if(checkpointid == BankSystem)
{
ShowPlayerDialog(playerid,DIALOG_BANK,DIALOG_STYLE_LIST,""COL_BLUE"Downtown Roleplay bank system","Deposit\nWithdraw","Choose","Cancel");
}
if(checkpointid == SweeperJob)
{
ShowPlayerDialog(playerid,DIALOG_SWEEPERJOB,DIALOG_STYLE_MSGBOX,"Streep weeper Registration","Test","Yes","No");
}
return 1;
}
I made like a street sweeper job with OnPlayerEnterRaceCheckpoint like this:
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(SweeperCP[playerid] == 1)
{
SetPlayerRaceCheckpoint(playerid,0,-2334.6729,2385.2109,5.5064,-2454.7063,2334.3398,4.5608, 3.0);
SweeperCP[playerid]++;
}
else if (SweeperCP[playerid] == 2)
{
SetPlayerRaceCheckpoint(playerid,0,-2454.7063,2334.3398,4.5608,-2468.2590,2322.1565,4.5611, 3.0);
SweeperCP[playerid]++;
}
else if(SweeperCP[playerid])
{
SendClientMessage(playerid, 0xAA3333AA, "You have finished your job! Here is 1000 dollars for your effort!");
SweeperCP[playerid] = 0;
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
}