Weird problem using DynamicCP
#1

Hello,

I am using DynamicCP to entered building, everything works when I am the only player online but right after someone login and we are 2 or more in the server nothing hapenned when you go into the checkpoint... that's weird,

Here my code:

pawn Код:
new BankEntrance;
new BankExit;
new BankSystem;
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PosX[playerid] !=0 && PosY[playerid] !=0 && PosZ[playerid] !=0 && Angle[playerid] != 0)
    {
        SetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]);
        SetPlayerFacingAngle(playerid,Angle[playerid]);
        SetPlayerInterior(playerid,Interior[playerid]);
        SetPlayerVirtualWorld(playerid,VirtualWorld[playerid]);
    }
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    BankEntrance = CreateDynamicCP(2435.2395,1655.4387,10.8203,1.0,-1,-1,-1,40.0);
    BankExit = CreateDynamicCP(2304.7026,-16.1553,26.7422,1.0,-1,-1,-1,40.0);
    BankSystem = CreateDynamicCP(2316.5315,-10.0041,26.7422,1.0,-1,-1,-1,40.0);
    return 1;
}
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid ==  BankEntrance)
    {
        SetPlayerPos(playerid,2307.9602,-15.7342,26.7496);
        SetPlayerFacingAngle(playerid,270.5396);
        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)
    {
        SetPlayerPos(playerid,2435.1694,1652.7235,10.8203);
        SetPlayerFacingAngle(playerid,182.1696);
        SetPlayerInterior(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");
    }
}
Hope someone will find this weird issue, thanks in advance !
Reply


Messages In This Thread
Weird problem using DynamicCP - by vernz - 11.03.2012, 22:30
Re : Weird problem using DynamicCP - by vernz - 12.03.2012, 11:25
Re: Weird problem using DynamicCP - by Faisal_khan - 12.03.2012, 11:36
Re : Weird problem using DynamicCP - by vernz - 12.03.2012, 11:45
Re: Re : Weird problem using DynamicCP - by Faisal_khan - 12.03.2012, 11:48

Forum Jump:


Users browsing this thread: 4 Guest(s)