Loop & IsPlayerInRange problem
#1

(Bad English i know =D)!

Hi all,
i have 2 problems,
the loop and isplayerinrangeofpoint works not right...

This is my command:

PHP код:
if(strcmp(cmd,"/kaufen",true)==0)
{
    for(new 
0sizeof(HausInfo); h++)
    {
        if(!
IsPlayerInRangeOfPoint(playerid3.0HausInfo[h][eX], HausInfo[h][eY], HausInfo[h][eZ]))return SendClientMessage(playerid,FARBE_WEIЯ,"Du stehst an keinem Haus!");
        {
            if(
SpielerInfo[playerid][pHaus] == 0)
            {
                if(
GetPlayerMoney(playerid) < HausInfo[h][Preis])return 1;
                new 
Name[MAX_PLAYER_NAME];
                
GetPlayerName(playeridNameMAX_PLAYER_NAME);
                
GivePlayerMoney(playerid, - HausInfo[h][Preis]);
                
strmid(HausInfo[h][Besitzer], Name0strlen(Name), 24);
                
HausInfo[h][Vergeben] = 1;
                
SpielerInfo[playerid][pHaus] = 1;
                
SpielerInfo[playerid][pId] = h+1;
                
WennSpielerUpdatet(playerid);
                
Kauf(playerid);
                
SendClientMessage(playerid,FARBE_WEIЯ,"Du hast dir ein Haus gekauft, die befehle kannst du unter /hh sehen!");
                return 
1;
            }
            else
            {
                
SendClientMessage(playerid,FARBE_WEIЯ,"Du hast bereits ein Haus, dieses musst du verkaufen!");
                return 
1;
            }
        }
    }
    return 
1;

i have three houses, and /kaufen worked only one house, the other two is always the else of IsPlayerInRangeOfPoint !

this is my house.cfg

PHP код:
eX0=1642.3235,
eY0=-2204.3228,
eZ0=13.5469,
aX0=0.0000
aY0
=0.0000
aZ0
=0.0000
Preis0
=1000
Besitzer0
=Staat
Vergeben0
=0
Id0
=1
//-----------------
eX1=1685.7727,
eY1=-2204.3157,
eZ1=13.5469,
aX1=0.0000
aY1
=0.0000
aZ1
=0.0000
Preis1
=2000
Besitzer1
=Staat
Vergeben1
=0
Id1
=2
//-----------------
eX2=1730.1548,
eY2=-2204.2449,
eZ2=13.5469,
aX2=0.0000
aY2
=0.0000
aZ2
=0.0000
Preis2
=3000
Besitzer2
=Staat
Vergeben2
=0
Id2
=
what is wrong?
i hope anywhere can help me, I do not know what to do
Reply


Messages In This Thread
Loop & IsPlayerInRange problem - by Schnacke - 14.07.2010, 23:20
Re: Loop & IsPlayerInRange problem - by Carlton - 14.07.2010, 23:22
AW: Loop & IsPlayerInRange problem - by Schnacke - 14.07.2010, 23:36
Re: Loop & IsPlayerInRange problem - by Carlton - 14.07.2010, 23:39
AW: Loop & IsPlayerInRange problem - by Schnacke - 14.07.2010, 23:50
Re: AW: Loop & IsPlayerInRange problem - by Carlton - 14.07.2010, 23:53
AW: Loop & IsPlayerInRange problem - by Schnacke - 14.07.2010, 23:56
Re: AW: Loop & IsPlayerInRange problem - by Carlton - 14.07.2010, 23:57
AW: Loop & IsPlayerInRange problem - by Schnacke - 15.07.2010, 00:13
AW: Loop & IsPlayerInRange problem - by Schnacke - 15.07.2010, 00:42

Forum Jump:


Users browsing this thread: 1 Guest(s)