[HELP] PICKUP'S PROBLEM
#1

i want to remove the pickups and add checkpoints .. and this is the Ipckup code

Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
	{
		if(HouseInfo[h][hOwned] == 0)
		{
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75, 25.0, 0);
			HouseInfo[h][hPickupID]=CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
			pickups++;
		}
		if(HouseInfo[h][hOwned] == 1)
		{
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75, 25.0, 0);
			HouseInfo[h][hPickupID]=CreateDynamicPickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
			pickups++;
		}
	}
I tried remplacing Setplayercheckpoint with Createdynamicpickup , but didnt work and the pickups disappeared
Reply
#2

what you really want?
Reply
#3

I want to make just like that guy wanted to do
https://sampforum.blast.hk/showthread.php?tid=187762
I want to remplace the pickup's with checkpoints , when a player enter the checkpoint it will send him a message saying You are standing on %'s Porch Available Commands ..
Reply
#4

I did what they told him there but it gives errors , can you please give me the checkpoint code so i just paste it and compile , and the message , i can make it myself
Reply
#5

There is also an edit button. List your error's here
Reply
#6

here ,
Before

Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
	{
		if(HouseInfo[h][hOwned] == 0)
		{
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75, 25.0, 0);
			HouseInfo[h][hPickupID]=CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
			pickups++;
		}
		if(HouseInfo[h][hOwned] == 1)
		{
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75, 25.0, 0);
			HouseInfo[h][hPickupID]=CreateDynamicPickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
			pickups++;
		}
	}
After
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        for(new h = 0; h < sizeof(HouseInfo); h++)
        {
            if(HouseInfo[h][hOwned] == 0)
            {
                if(HouseInfo[h][hSetted] == 1)
                {
                    if(IsPlayerInRangeOfPoint(i, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
                    {
                        SetPlayerCheckpoint(i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 5.0);
                    }
                }
            }
            else
            {
                format(PropertyString,sizeof(PropertyString),"House is Owned by %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n To Rent Type /rentroom", HouseInfo[h][hOwner],HouseInfo[h][hWorld], HouseInfo[h][hRent], HouseInfo[h][hDiscription]);
                HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
                HousePickup[h] = CreateDynamicPickup(1272, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
            }
        }
    }
}
ERRORS
Код:
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6076) : error 017: undefined symbol "hSetted"
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6086) : error 017: undefined symbol "PropertyString"
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6086) : error 017: undefined symbol "PropertyString"
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6086) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6086) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#7

Код:
new PropertyString[100];
?
Reply
#8

Код:
new PropertyString[100];
And in your Houseinfo enum:

Код:
enum hInfo
{
     hSetted,
}
Reply
#9

i'll try this and reply with the result .. Thanks guys
Reply
#10

I got these now

Код:
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6089) : error 017: undefined symbol "HouseLabel"
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6089) : warning 215: expression has no effect
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6089) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6089) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jaber\Bureau\UnlimitedRP\UnlimitedRP\gamemodes\U-RP.pwn(6089) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)