Problem with house lock.
#1

Hi all.Maybe somebody can help my.This is my house lock script:

COMMAND:hlock(playerid, params[])
{
if(!strcmp(houseDB[GetPlayerVirtualWorld(playerid)][owner_name],"no",true))
{
SendClientMessage(playerid,COLOR_GREY,"* This is not your house");
return 1;
}
if(houseDB[playerid][hkey] == false)
{
SendClientMessage(playerid,COLOR_GREY,"* house already locked");
return 1;
}
houseDB[playerid][hkey] = false;
SendClientMessage(playerid,COLOR_GREY,"* house locked");
return 1;
}

COMMAND:hunlock(playerid, params[])
{
if(!strcmp(houseDB[GetPlayerVirtualWorld(playerid)][owner_name],"no",true))
{
SendClientMessage(playerid,COLOR_GREY,"* This is not your house");
return 1;
}
if(houseDB[playerid][hkey] == true)
{
SendClientMessage(playerid,COLOR_GREY,"* house already unlocked");
return 1;
}
houseDB[playerid][hkey] = true;
SendClientMessage(playerid,COLOR_GREY,"* house unlocked");
return 1;
}

>>>>>>>>>>>>>>>>>>>>>>>>>>>houseDB[playerid][hkey] = false;<<<<<<<<<<<<<<<<<<<<<<<<<

And how to do this not for player id,but for player house,I don't know how to say it correctly,and then when somebody go on house pickup and if he unlocked he can go to the house.
Reply
#2

any help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)