Address wont save
#7

Quote:
Originally Posted by dr.lozer
Посмотреть сообщение
Add this on top and down of the #include <a_samp>

Код:
#if !defined isnull
	#define isnull(%1) \
				((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
then use this:

pawn Код:
command(sethouseaddress, playerid, params[])
{
    new string[128];
    if(isnull(params))
    {
        if(Player[playerid][AdminLevel] >= 6)
        {
            SendClientMessage(playerid, WHITE, "SYNTAX: /sethouseaddress [address]");
        }
    }
    else
    {
        if(Player[playerid][AdminLevel] >= 6)
        {
            for(new h = 0; h < MAX_HOUSES; h++)
            {
                if(strcmp(Houses[h][hAddress], address, true))
                {
                    if(IsPlayerInRangeOfPoint(playerid, 2, Houses[h][hExteriorX], Houses[h][hExteriorY], Houses[h][hExteriorZ]))
                    {
                        format(Houses[h][hAddress], 255, "%s", params);
                        format(string, sizeof(string), "You succesfully renamed house id: %d's address to: %s", h, params);
                        SCM(playerid, YELLOW, string);
                        SaveHouse(h);
                        break;
                    }
                }
                else
                {
                    SCM(playerid, RED, "This address already exists");
                }
            }
        }
    }
    return 1;
}
Let me test
Reply


Messages In This Thread
Address wont save - by Stefand - 09.12.2012, 07:57
Re: Address wont save - by dr.lozer - 10.12.2012, 13:59
Re: Address wont save - by Stefand - 10.12.2012, 14:06
Re: Address wont save - by zDevon - 10.12.2012, 14:08
Re: Address wont save - by dr.lozer - 10.12.2012, 14:09
Re: Address wont save - by Stefand - 10.12.2012, 14:10
Re: Address wont save - by Stefand - 10.12.2012, 14:12
Re: Address wont save - by Stefand - 10.12.2012, 14:23
Re: Address wont save - by zDevon - 10.12.2012, 15:07
Re: Address wont save - by Stefand - 10.12.2012, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)