24.06.2010, 10:27
(Sry for bad English )
Hi all,
i have a problem,
this is my cmd:
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?
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; }
What is the problem?