03.06.2010, 16:47
pawn Код:
dcmd_renthouse(playerid,params[]) { // This needs to be intergrated with your players .ini account
#pragma unused params
if(IsPlayerConnected(playerid)){
for(new h = 0; h <= MAX_HOUSES; h++){
if(PlayerToPoint(PTP_RADIUS, playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ])){
if(HouseInfo[h][hName] == "Name") return SendClientMessage(playerid, COLOR_WHITE, ".:: [ERROR]: No one has bought this house so you cannot rent from here.");
if(PlayerInfo[playerid][pHouse] != -1) return SendClientMessage(playerid, COLOR_WHITE, ".:: [ERROR]: You are allready renting a house. Use /unrenthouse to stop renting there.");
PlayerInfo[playerid][pHouse] = h;
SendFormattedMessage(playerid, COLOR_WHITE, ".:: [HOUSE]: You are now renting from %s.", HouseInfo[h][hName]);
} } }
return true;
}