Locking system possible flaw
#1

Hey
When I was scripting this is was confusing myself with this locking system.. When I set the house too locked (House[playerid][hLocked] = 1) Wouldn't that only lock the house for the player that locked it? and everyone else would still be able to enter the house?

Here is my locking system
pawn Код:
//Mind the missing brackets, I'm still working on this :P
    if(IsPlayerInRangeOfAnyHouse(playerid,2))
    {
        if(House[playerid][hLinked] == Player[playerid][pAccountID])
        {
            if(House[playerid][hLocked] == 0)
            {
                House[playerid][hLocked] = 1);
                SendClientMessage(playerid,COLOR_GREY, "You have locked your house.");
            }
            if(House[playerid][hLocked] == 1)
            {
                House[playerid][hLocked] = 1);
                SendClientMessage(playerid, COLOR_GREY, "You have unlocked your house.);
            }

        return 1;
    }
Reply
#2

Only for you i think
Reply
#3

For you obv, and you created the house variables for players ?

pawn Код:
if(House[playerid][hLocked] == 0)
,___,
[O.o]
/)__)
-"--"-
Reply
#4

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
For you obv
Yea that's what I thought. Bugger... Nah I gotta stuff around trying to get IDs -.-

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
and you created the house variables for players ?

pawn Код:
if(House[playerid][hLocked] == 0)
,___,
[O.o]
/)__)
-"--"-
Ahhh... Now that you make me think of it..... I suppose not.... -.- FML.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)