IsPlayerInRangeOfPoint/Command problem
#1

(Sry for bad English )
Hi all,
i have a problem,
this is my cmd:

Код:
if(strcmp(cmd,"/kaufen",true)==0)
	{
		for(new i=0;i<MAX_HOUSES;i++)
		{
		  if(IsPlayerInRangeOfPoint(playerid, 3.0, HausInfo[i][eX], HausInfo[i][eY], HausInfo[i][eZ]))
		  {
		    if(GetPlayerMoney(playerid) < HausInfo[i][Preis])
				{
		    	new Name[MAX_PLAYER_NAME];
			    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
					GivePlayerMoney(playerid, - HausInfo[i][Preis]);
					strmid(HausInfo[i][Besitzer], Name, 0, strlen(Name), 24);
					HausInfo[i][Vergeben] = 1;
					SendClientMessage(playerid, FARBE_WEIЯ,"Du hast das Haus gekauft, um Befehle anzusehen schreibe /hauscmds !");
					return 1;
				}
				else
				{
				  SendClientMessage(playerid,FARBE_WEIЯ,"Du hast zu wenig Geld, du musst zuerst das Geld auf der Hand haben.");
				  return 1;
			 	}
		  }
		  else
		  {
        SendClientMessage(playerid, FARBE_WEIЯ,"Du befindest dich nicht an einem Haus das zum Verkauf steht!");
        return 1;
   		}
		}
		return 1;
	}
It does not matter whether I have enough money or not at the house bin, there is always the last SendClientMessage.
What is the problem?
Reply


Messages In This Thread
IsPlayerInRangeOfPoint/Command problem - by wofka13 - 24.06.2010, 10:27
Re: IsPlayerInRangeOfPoint/Command problem - by bajskorv123 - 24.06.2010, 10:29
Re: IsPlayerInRangeOfPoint/Command problem - by KuHS - 24.06.2010, 10:32
Re: IsPlayerInRangeOfPoint/Command problem - by wofka13 - 24.06.2010, 15:15
Re: IsPlayerInRangeOfPoint/Command problem - by KuHS - 24.06.2010, 16:54
Re: IsPlayerInRangeOfPoint/Command problem - by wofka13 - 24.06.2010, 17:12

Forum Jump:


Users browsing this thread: 1 Guest(s)