SetPlayerCheckpoint
#1

SetPlayerCheckpoint Not Working
i removed the dynamic checkpoints in the streamer
got the streamer include no error / warning in compiling
pawn Код:
enum hInfo
{
    Float:h_cpx,
    Float:h_cpy,
    Float:h_cpz,
    h_cpsize,
    h_cptype,
    h_cpbustype,
    h_cpmarker,
    Float:h_cp_radius,
    Float:h_entry_x,
    Float:h_entry_y,
    Float:h_entry_z,
    Float:h_entry_a,
    h_entry_i,
    h_entry_w,
    Float:h_exit_x,
    Float:h_exit_y,
    Float:h_exit_z,
    Float:h_exit_a,
    h_HouseIntName[256],
    h_HouseExtName[256]

};
new pInfo[MAX_PLAYERS][PlayerInfo];
new HouseInfo[][hInfo] =
{
    {2463.996337, 2244.893066, 10.820312,       2, CP_TYPE_ENTRY,   BUS_TYPE_BANK,  52, 30.0        ,2309.408447, -15.663831, 26.749565, 277.688171     ,0,310  ,2463.949462, 2241.169433, 10.820312, 179.010665,   "The Bank" ,"Roca Escalante"},
    {2306.059814, -16.113458, 26.749565,        2, CP_TYPE_EXIT,    0,  0, 4.0   ,0.0,0.0,0.0,0.0       ,0,0    ,0.0,0.0,0.0,0.0,   "Bank Exit" ,"Exterior N/A"}
};
pawn Код:
forward checkpointUpdate();
public checkpointUpdate()
{
    for(new i; i < GetMaxPlayers(); i++)
    {

        if(IsPlayerConnected(i) && pInfo[i][pSpawn] == 1)
        {


                        new j = GetClosestCheckpoint(i);


                        if (j > 0)
                        {

                        if(pInfo[i][pCheckpoint] != j)
                        {

                        pInfo[i][pCheckpoint] = j;
                        SetPlayerCheckpoint(i,HouseInfo[j][h_cpx], HouseInfo[j][h_cpy], HouseInfo[j][h_cpz],HouseInfo[j][h_cpsize]);


                        //format(string, sizeof(string), "Checkpoint %d",j);
                        //SendClientMessage(i, COLOR_YELLOW, string);
                        }

                        }else{

                        if (pInfo[i][pCheckpoint] != 0)
                        {
                        pInfo[i][pCheckpoint] = 0;
                        DisablePlayerCheckpoint(i);
                        }

                        }

        }//End Of For connection and spawn check

    }//End Of For Loop

    //return 1;
}
ongamemodeinit
pawn Код:
CheckPointTimer = SetTimerEx("checkpointUpdate", 1000, 1, "d", "d");
Reply


Messages In This Thread
SetPlayerCheckpoint - by AroseKhanNiazi - 20.05.2014, 14:50
Re: SetPlayerCheckpoint - by AroseKhanNiazi - 21.05.2014, 03:26
Re: SetPlayerCheckpoint - by Threshold - 21.05.2014, 04:39
Re: SetPlayerCheckpoint - by AroseKhanNiazi - 21.05.2014, 05:09
Re: SetPlayerCheckpoint - by MacT - 21.05.2014, 05:21
Re: SetPlayerCheckpoint - by AroseKhanNiazi - 21.05.2014, 05:37
Re: SetPlayerCheckpoint - by Threshold - 22.05.2014, 09:37
Re: SetPlayerCheckpoint - by AroseKhanNiazi - 22.05.2014, 09:54
Re: SetPlayerCheckpoint - by Threshold - 22.05.2014, 11:00
Re: SetPlayerCheckpoint - by AroseKhanNiazi - 22.05.2014, 11:15

Forum Jump:


Users browsing this thread: 1 Guest(s)