rikz | Дата: Четверг, 01.09.2011, 14:56:30 | Сообщение # 1 |
Группа: Пользователи
Сообщений: 32
| if(strcmp(cmd, "/buyhouse", true) == 0) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; GetPlayerName(playerid, playername, sizeof(playername)); GetPlayerPos(playerid, oldposx, oldposy, oldposz); for(new h = 0; h < sizeof(HouseInfo); h++) { if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0) { if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel]) { format(string, sizeof(string), " Ó âàñ ñëèøêîì íèçêèé óðîâåíü äëÿ ïîêóïêè ýòîãî äîìà!", HouseInfo[h][hLevel]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { SendClientMessage(playerid, COLOR_WHITE, " Ó âàñ óæå åñòü äîì. Ñíà÷àëà ïðîäàéòå åãî: /sellhouse - äëÿ ïðîäàæè ñâîåãî äîìà!"); return 1; } if(GetSRVMoney(playerid) > HouseInfo[h][hValue]) { PlayerInfo[playerid][pPhousekey] = h; HouseInfo[h][hOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255); GiveMoney(playerid,-HouseInfo[h][hValue]); PlayerPlayMusic(playerid); SetPlayerInterior(playerid,HouseInfo[h][hInt]); SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]); GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3); PlayerInfo[playerid][pInt] = HouseInfo[h][hInt]; PlayerInfo[playerid][pLocal] = h; SetPlayerVirtualWorld(playerid,HouseInfo[h][hVirtual]); SendClientMessage(playerid, COLOR_WHITE, " Ïèøèòå /help òàì ïîÿâèëèñü íîâûå êîìàíäû!"); DateProp(playerid); OnPropUpdate(); OnPlayerUpdate_GF(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "Ó âàñ íå õâàòàåò äåíåã!"); return 1; } } } } return 1; } как мне зделать это
Сообщение отредактировал rikz - Четверг, 01.09.2011, 15:01:01 |
|
|
|