Loop & IsPlayerInRange problem
#2

pawn Код:
if(strcmp(cmd,"/kaufen",true)==0)
{
    for(new h = 0; h < sizeof(HausInfo); h++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, HausInfo[h][eX], HausInfo[h][eY], HausInfo[h][eZ]))
        {
            if(SpielerInfo[playerid][pHaus] == 0)
            {
                if(GetPlayerMoney(playerid) < HausInfo[h][Preis])return 1;
                new Name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
                GivePlayerMoney(playerid, - HausInfo[h][Preis]);
                strmid(HausInfo[h][Besitzer], Name, 0, strlen(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;
}
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)