House adding
#1

When I do this, is saves the floats as 0.000000 for all of them.

When I do the SetPlayerPos it sets me to Blueberry falling underneath the ground.

What's up with it?

pawn Код:
command(addhouse, playerid, params[])
{
    new Float:IntX, Float:IntY, Float:IntZ, Float:ExtX, Float:ExtY, Float:ExtZ, Interior, string[256], Section[9];
    if(Player[playerid][AdminLevel] >= 10 || IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "s[9]", Section)) return SendClientMessage(playerid, WHITE, "Server: /addhouse [exterior/interior/complete]");
        {
            if(strmatch("interior", Section))
            {
                GetPlayerPos(playerid, IntX, IntY, IntZ);
                Interior = GetPlayerInterior(playerid);
                format(string, sizeof(string), "Interior set. (%f %f %f - %d)", IntX, IntY, IntZ, Interior);
                SendClientMessage(playerid, WHITE, string);
            }
            else if(strmatch("exterior", Section))
            {
                GetPlayerPos(playerid, ExtX, ExtY, ExtZ);
                format(string, sizeof(string), "Exterior set. (%f %f %f)", ExtX, ExtY, ExtZ);
                SendClientMessage(playerid, WHITE, string);
            }
            else if(strmatch("complete", Section))
            {
                format(string, sizeof(string), "House added.");
                printf("%f, %f, %f, %f, %f, %f, %i", ExtX, ExtY, ExtZ, IntX, IntY, IntZ, Interior);
                SendClientMessage(playerid, WHITE, string);
                SetPlayerPos(playerid, ExtX, ExtY, ExtZ);
                SetPlayerInterior(playerid, 0);
                SaveHouse(ExtX, ExtY, ExtZ, IntX, IntY, IntZ, Interior);
            }
            else return SendClientMessage(playerid, WHITE, "Server: /addhouse [exterior/interior/complete]");
        }
    }
    else return SendClientMessage(playerid, GREY, AdminOnly);
    return 1;
}
Reply


Messages In This Thread
House adding - by iGetty - 28.05.2012, 22:49
Re: House adding - by MP2 - 28.05.2012, 22:53
Re: House adding - by iGetty - 28.05.2012, 22:54
Re: House adding - by MP2 - 28.05.2012, 23:33

Forum Jump:


Users browsing this thread: 1 Guest(s)