13.09.2012, 16:44
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
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;
}