SA-MP Forums Archive
Help with Disabling Checkpoints - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Disabling Checkpoints (/showthread.php?tid=274732)



Help with Disabling Checkpoints - Jaber_Brown - 07.08.2011

Код:
public LoadPickups()
{
    for(new h = 0; h < sizeof(HouseInfo); h++) {
        if(HouseInfo[h][hOwned] == 0) Housess[h] = CreateDynamicCP(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 2.2000, -1, -1, -1, 7.5);
        else if(HouseInfo[h][hOwned] == 1) HousesOwned[h] = CreateDynamicCP(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],2.2000, -1, -1, -1, 7.5);
    }
}


public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    for(new h = 0; h < sizeof(HouseInfo); h++) {
        if (PlayerToPoint(2.5,playerid,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez])) {
            if(HouseInfo[h][hValue] != 0) {
                if(HouseInfo[h][hOwned] == 0) {
                    new string[128];
                    SendClientMessage(playerid, COLOR_GREEN, "Would you like to buy this?");
                    format(string, sizeof(string), "Price: $%d", HouseInfo[h][hValue]);
                    SendClientMessage(playerid, COLOR_GREEN, string);
                    SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)");
                    SendClientMessage(playerid, COLOR_WHITE, "/buyhouse");
                }
                else {
                    if(HouseInfo[h][hRentabil] == 1) {
                        new string[128];
                        new string2[128];
                        format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,HouseInfo[h][hOwner]);
                        SendClientMessage(playerid, COLOR_GREEN, string);
                        format(string2, sizeof(string2), "Available commands: /enter, /ds(hout), /knock, /doorbell, /breakin, /rentroom (Price: $%d)", HouseInfo[h][hRent]);
                        SendClientMessage(playerid, COLOR_WHITE, string2);
                    }
                    else {
                        new string[128];
                        format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,HouseInfo[h][hOwner]);
                        SendClientMessage(playerid, COLOR_GREEN, string);
                        SendClientMessage(playerid,COLOR_WHITE,"Available commands: /enter, /ds(hout), /knock, /doorbell, /breakin.");
                    }
                }
            }
        }
    }
}
When i walk on the Checkponts of houses they disappear , how can i make them displayed as long as im on them ?