House spawnplace bug help
#1

Hi have a problem i've written / spawnplace house but I Appears main
please help



pawn Код:
COMMAND:spawnplace( playerid, params[ ] )
{
    if ( !strcmp( "house", params, true, 5 ) )
    {
        new
            plvirworld = PlayerInfo[ playerid ][ pVirWorld ];

        foreach (Namai, namoid)
        {
            new
                namduom[ namu_mas ],
                intduom[ intInfo  ];

            namduom = NamuDuom[ namoid          ];
            intduom = NamuInt [ namduom[ nint ] ];

            if ( IsPlayerInRangeOfPoint( playerid, 1.5, namduom[ nx ],
                 namduom[ ny ], namduom[ nz ] ) ||
                 ( plvirworld == namduom[ nid ] &&
                 IsPlayerInRangeOfPoint( playerid, 4, intduom[ intX ],
                                         intduom[ intY ], intduom[ intZ ] ) ) )
            {
                new
                    plinf[ pInfo ],
                    hsql = namduom[ nid ];

                plinf = PlayerInfo[ playerid ];

                if ( plinf[ pSQLID    ] == namduom[ nsavininkas ] ||
                     plinf[ pHouseKey ] == hsql )
                {
                    if ( plinf[ pSpawnPlace ] == hsql )
                        SendClientMessage( playerid, COLOR_GREY, "   Appearance of the place is already found in the house." );
                    else
                    {
                        PlayerInfo[ playerid ][ pSpawnPlace ] = hsql;
                        UpdateMySQLSpawnPlace( playerid );
                        SendClientMessage    ( playerid, COLOR_WHITE, "   Arose in the successful. " );
                    }
                }
                else
                    SendClientMessage( playerid, COLOR_GREY, "   This house belongs to you and you do not rent" );

                return true;
            }
        }

        SendClientMessage( playerid, COLOR_GREY, "   You must be at the entrance or exit home" );
    }
    else if ( !strcmp( "main", params, true, 10 ) )
    {
        if ( PlayerInfo[ playerid ][ pSpawnPlace ] == 0 )
            SendClientMessage( playerid, COLOR_GREY, "   Place your appearance has already been established
on the base."
);
        else
        {
            PlayerInfo[ playerid ][ pSpawnPlace ] = 0;
            UpdateMySQLSpawnPlace( playerid );
            SendClientMessage    ( playerid, COLOR_WHITE, "   Appearance of the place in the main successful." );
        }
    }
    else
        SendUsage( playerid, "/spawnplace [house/main]" );

    return true;
}
Reply
#2

Please use [pawn] [/ pawn], With out that " " space.
Reply
#3

now well?
Reply
#4

help plz
Reply
#5

up up
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)