20.04.2012, 19:16
How i can to lock my house when i am in interior ?
This is /lock command :
This is /lock command :
pawn Код:
dcmd_lock(playerid,params[])
{
#pragma unused params
new str1[256],pname[24],housenumber;
housenumber = GetHouseID(playerid);
GetPlayerName(playerid, pname, 24);
format(str1, sizeof(str1), "Houses/houseid%d", housenumber);
if(strcmp(hInfo[housenumber][Name],pname,true)==0)
{
SendClientMessage(playerid, c_y, "{FFFFFF}You have locked your house.");
dini_IntSet(str1,"Locked",1);
hInfo[housenumber][Locked] = 1;
}
else if(strcmp(hInfo[housenumber][Renter],pname,true)==0)
{
SendClientMessage(playerid, c_y, "{FFFFFF}You have locked your house.");
dini_IntSet(str1,"Locked",1);
hInfo[housenumber][Locked] = 1;
}
else
{
SendClientMessage(playerid, c_r, "{FFFFFF}This house isn't your.");
}
return 1;
}