SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/05/2012, 05:20 PM   #1
HighPitchedVoice
Huge Clucker
 
Join Date: Dec 2011
Posts: 257
Reputation: 17
Default Criminals cant enter houses!

I want this removed so they can enter houses...

pawn Code:
if(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new i = 0; i < sizeof(HouseInfo); i++)
            {
                if (IsPlayerInRangeOfPoint(playerid, 10,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
                {
                    //printf("Found House :%d",i);
                    if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
                    {
                        if(PlayerInfo[playerid][pWanted] == 0
                        {
                            SafeSetPlayerInterior(playerid,HouseInfo[i][hInt]);
                            SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
                            SafeSetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
                            GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
                            PlayerInfo[playerid][pLocal] = i;
                            PlayerInfo[playerid][pVirWorld] = HouseInfo[i][hWorld];
                            HouseEntered[playerid] = i;
                            PlayerInfo[playerid][pInteriorNr] = 39;
                        }
                        else
                        {
                            GameTextForPlayer(playerid, "~r~Criminals can't hide in houses!", 5000, 1);
                            return 1;
                        }
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
                        return 1;
                    }
                }
            }
__________________

Join our clan today,
one of the best deathmatch clans around!
HighPitchedVoice is offline   Reply With Quote
Old 02/05/2012, 05:28 PM   #2
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,315
Reputation: 720
Default Re: Criminals cant enter houses!

pawn Code:
if(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new i = 0; i < sizeof(HouseInfo); i++)
            {
                if (IsPlayerInRangeOfPoint(playerid, 10,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
                {
                    //printf("Found House :%d",i);
                    if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
                    {
                            SafeSetPlayerInterior(playerid,HouseInfo[i][hInt]);
                            SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
                            SafeSetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
                            GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
                            PlayerInfo[playerid][pLocal] = i;
                            PlayerInfo[playerid][pVirWorld] = HouseInfo[i][hWorld];
                            HouseEntered[playerid] = i;
                            PlayerInfo[playerid][pInteriorNr] = 39;
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
                        return 1;
                    }
                }
            }
__________________



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Burglar Houses Interiors(30 Houses) pierhs Filterscripts 5 20/08/2009 06:26 PM


All times are GMT. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.