01.07.2013, 17:23
i want to add IsPlayerInRangeOfPoint for this command
i'll Remove SafeSetPlayerPos And SetPlayerVirtualWorld ....
you won't need this but , here's the location ...
i know you already notice that i want to make it somehow that you can only sell your house in City Hall , sounds more Real
So help me out here
just need to know where to add IsPlayerInRangeOfPoint And Where to add Return of it with a SendClientMessage
--------------------
Код:
if(strcmp(cmd, "/sellhouse", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, playername, sizeof(playername)); if(PlayerInfo[playerid][pPhousekey] == 9999) { SendClientMessage(playerid, COLOR_WHITE, "You don't own a house."); return 1; } if(PlayerInfo[playerid][pMarried] > 0) { SendClientMessage(playerid, COLOR_GREY, "** You are Married, can't sell the House !"); return 1; } if(CanSellHouse[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "You can't sell the house without first authorizing it at /account panel!"); return 1; } if(PlayerInfo[playerid][pPhousekey] != 9999 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { new house = PlayerInfo[playerid][pPhousekey]; HouseInfo[house][hHel] = 0; HouseInfo[house][hArm] = 0; HouseInfo[house][hHealthx] = 0; HouseInfo[house][hHealthy] = 0; HouseInfo[house][hHealthz] = 0; HouseInfo[house][hArmourx] = 0; HouseInfo[house][hArmoury] = 0; HouseInfo[house][hArmourz] = 0; HouseInfo[house][hLock] = 1; HouseInfo[house][hOwned] = 0; HouseInfo[house][hVec] = 418; HouseInfo[house][hVcol1] = -1; HouseInfo[house][hVcol2] = -1; strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255); strmid(HouseInfo[house][hMessage],"For Sale",0,strlen("For Sale"),255); //ConsumingMoney[playerid] = 1; SafeGivePlayerMoney(playerid,HouseInfo[house][hValue]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", HouseInfo[house][hValue]); GameTextForPlayer(playerid, string, 10000, 3); PlayerInfo[playerid][pPhousekey] = 9999; if(PlayerInfo[playerid][pLocal] == house) { SafeSetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0); SafeSetPlayerPos(playerid,HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]); } OnPropUpdate(1,house); OnPropTextdrawUpdate(1, house); OnHousePickupUpdate(house); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "You don't own a house."); } } return 1; }
you won't need this but , here's the location ...
Код:
364.65121, 173.86839, 1007.37799
So help me out here
just need to know where to add IsPlayerInRangeOfPoint And Where to add Return of it with a SendClientMessage
--------------------