House Help
#1

Hello. I have this:

pawn Код:
CMD:housewithdraw(playerid, params[])
{
    new id = Player[playerid][Houseid];
    new i = GetClosetHouseID(playerid);
    if(id == 999) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error{FFFFFF}: You don't have a house.");
    new string[128],money;
    if(!IsPlayerInRangeOfPoint(playerid,30.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error{FFFFFF}: You are not inside your house.");
    if(sscanf(params, "i",money)) return SendClientMessage(playerid, COLOR_TWGRAY, "Usage{FFFFFF}: /housewithdraw [Cash Amount]");
    if(money > House[id][Money]) return SendClientMessage(playerid, COLOR_LIGHTRED, "Error{FFFFFF}: Your safe doesn't contain enough money for this.");
    if(money < 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "Error{FFFFFF}: You have entered an invalid amount.");
    House[id][Money] -= money;
    PlayerInfo[playerid][pCash] += money;
    format(string, sizeof(string), "* %s withdraws some cash from their house safe.", GetName(playerid));
    ProxDetector(30, playerid, string, COLOR_PURPLE);
    CheckHouse(id);
    return 1;
}
If I own a house and go to another house then type /housewithdraw and /housedeposit it works without recognising me as owner.
Reply


Messages In This Thread
House Help - by AphexCCFC - 08.01.2013, 21:49

Forum Jump:


Users browsing this thread: 2 Guest(s)