Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Pickup to Checkpoints

$
0
0
Hi all.i need your help guyz. To check my Pickup's to Checkpoints... Like This..

so my problem is:- I'm already creating a Pickup's for House for Sale + For House not for sale! so i wanted to change The both Pickup's to Checkpoints Example:- Pickups changing to Checkpoints In the code below you will know.

So. How to change Both Pickup's For EXIT + For Entering? Here my code!

WARRING:- If you still not understand me Please write a command!!



PHP Code:

stock LoadHouse(houseid)
{
    
format(hInfo[houseid][hName], 256"%s"dini_Get(HousePath(houseid), "Name"));
    
format(hInfo[houseid][hOwner], 256"%s"dini_Get(HousePath(houseid), "Owner"));
    
format(hInfo[houseid][hIName], 256"%s"dini_Get(HousePath(houseid), "InteriorName"));
    
format(hInfo[houseid][hNotes], 256"%s"dini_Get(HousePath(houseid), "Notes"));
    
hInfo[houseid][hScore] = dini_Int(HousePath(houseid), "Score");
    
hInfo[houseid][hPrice] = dini_Int(HousePath(houseid), "Price");
    
hInfo[houseid][hSale] = dini_Int(HousePath(houseid), "Sale");
    
hInfo[houseid][hInterior] = dini_Int(HousePath(houseid), "Interior");
    
hInfo[houseid][hWorld] = dini_Int(HousePath(houseid), "World");
    
hInfo[houseid][hLocked] = dini_Int(HousePath(houseid), "Locked");
    
hInfo[houseid][hEnterPos][0] = dini_Float(HousePath(houseid), "xPoint");
    
hInfo[houseid][hEnterPos][1] = dini_Float(HousePath(houseid), "yPoint");
    
hInfo[houseid][hEnterPos][2] = dini_Float(HousePath(houseid), "zPoint");
    
hInfo[houseid][hEnterPos][3] = dini_Float(HousePath(houseid), "aPoint");
    
hInfo[houseid][hPickupP][0] = dini_Float(HousePath(houseid), "enterX");
    
hInfo[houseid][hPickupP][1] = dini_Float(HousePath(houseid), "enterY");
    
hInfo[houseid][hPickupP][2] = dini_Float(HousePath(houseid), "enterZ");
    
hInfo[houseid][ExitCPPos][0] = dini_Float(HousePath(houseid), "exitX");
    
hInfo[houseid][ExitCPPos][1] = dini_Float(HousePath(houseid), "exitY");
    
hInfo[houseid][ExitCPPos][2] = dini_Float(HousePath(houseid), "exitZ");
    
hInfo[houseid][MoneyStore] = dini_Int(HousePath(houseid), "MoneySafe");

    new 
string[256];

    if(
hInfo[houseid][hSale] == 0)
    {
        
format(string256""white"HouseID: "red"%d\n"green"House for Sale!\n"white"Price: "red"$%d\n"white"Interior: "green"%s\n"white"Score: "red"%d\n\n"white"/buyhouse to buy the house."houseidhInfo[houseid][hPrice], hInfo[houseid][hIName], hInfo[houseid][hScore]);
        
hInfo[houseid][hMapIcon] = CreateDynamicMapIcon(hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], SALE_ICON, -100, -1STREAM_DISTANCESMAPICON_LOCAL);
        
hInfo[houseid][hPickup] = CreateDynamicPickup(SALE_PICKUP1hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], 00, -1STREAM_DISTANCES);
    }
    else
    {
        if(
hInfo[houseid][hLocked] == 0)
        {
            if(
strcmp(hInfo[houseid][hName], "None"true) == 0)
            {
                
format(string256""white"HouseID: "red"%d\n"green"House is Unlocked!!\n"white"House By: "red"%s\n"white"Interior: "green"%s\n"white"Score: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hIName], hInfo[houseid][hScore], hInfo[houseid][hPrice]);
            }
            else
            {
                
format(string256""white"HouseID: "red"%d\n"green"House is Unlocked!!\n"white"House By: "red"%s\n"white"Name: "green"%s\n"white"Interior: "red"%s\n"white"Score: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hName], hInfo[houseid][hIName], hInfo[houseid][hScore], hInfo[houseid][hPrice]);
            }
        }
        else
        {
            if(
strcmp(hInfo[houseid][hName], "None"true) == 0)
            {
                
format(string256""white"HouseID: "red"%d\n"red"House is Locked!\n"white"House By: "red"%s\n"white"Interior: "green"%s\n"white"Score: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hIName], hInfo[houseid][hScore], hInfo[houseid][hPrice]);
            }
            else
            {
                
format(string256""white"HouseID: "red"%d\n"red"House is Locked!\n"white"House By: "red"%s\n"white"Name: "green"%s\n"white"Interior: "red"%s\n"white"Score: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hName], hInfo[houseid][hIName], hInfo[houseid][hScore], hInfo[houseid][hPrice]);
            }
        }
        
hInfo[houseid][hMapIcon] = CreateDynamicMapIcon(hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], NOTSALE_ICON, -100, -1STREAM_DISTANCESMAPICON_LOCAL);
        
hInfo[houseid][hPickup] = CreateDynamicPickup(NOTSALE_PICKUP1hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], 00, -1STREAM_DISTANCES);
    }
    
hInfo[houseid][hLabel] = CreateDynamic3DTextLabel(string, -1hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], STREAM_DISTANCESINVALID_PLAYER_IDINVALID_VEHICLE_ID100, -1STREAM_DISTANCES);
    
hInfo[houseid][hCP] = CreateDynamicCP(hInfo[houseid][ExitCPPos][0], hInfo[houseid][ExitCPPos][1], hInfo[houseid][ExitCPPos][2], 1.0hInfo[houseid][hWorld], hInfo[houseid][hInterior], -115.0);
    return 
1;


So!! Here you go!!!

NOTE:- Do not forgot i already making a Checkpoint for Exit From house! so dont change it i want only

[Checkpoint for House for sale + For house not for sale! so i meaning allowance Pickup's I Want Checkpoints!!

If u still need more infomation tell me!!


NOTE:- You still not understand? Look at the pictures here!!

Like this

Change To:- Leave the text's Only Checkpoints


I Hope you understand me!! NOW HELP ME!!

Viewing all articles
Browse latest Browse all 18226

Trending Articles