Skripta koju koristim://
Detaljan opis problema:Znaci ja kupim kucu ono zakljucam je odem relog i ponovno ocu da otkljucam i pise da nemam kucu i tako za sve komande, a ingame na kod kuce pise da sam ja vlasnik
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Mozda imas BUG u cuvanju koji mod koristis?
united gaming
Proveri ti dali kada kupis kucu i odes relog dali u fajlu ti sacuvao varijablu za kljuc kuce ako nije onda to sredis i nemas problema.
Daj komandu zakljucavanja kuce i otkljucanja cijelu komdanu....
if(strcmp(cmd, "/lockhouse", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new house = PlayerInfo[playerid][pHouseKey];
new house_2 = PlayerInfo[playerid][pHouseKey2];
new house_3 = PlayerInfo[playerid][pHouseKey3];
new house_4 = PlayerInfo[playerid][pHouseKey4];
if(house == -1 && house_2 == -1 && house_3 == -1 && house_4 == -1)
{
SendClientMessage(playerid, GREY, " You don't own a house.");
return 1;
}
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SyntaxMessage(playerid, "/lockhouse [1-2-3-4]");
new slot = strval(tmp);
if (slot < 1 || slot > 4) return SendClientMessage(playerid, GREY, "Slot can't be below 1, or above 4.");
if (slot == 1)
{
if (PlayerInfo[playerid][pHouseKey] == -1) return SendClientMessage(playerid, GREY, " You don't own a house in that slot.");
if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house][HouseEnterX], HouseInfo[house][HouseEnterY], HouseInfo[house][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house][HouseInsideX], HouseInfo[house][HouseInsideY], HouseInfo[house][HouseInsideZ]))
{
SendClientMessage(playerid, GREY, " You are not near/inside your house.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(HouseInfo[house][HouseLock] == 1)
{
HouseInfo[house][HouseLock] = 0;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
else
{
HouseInfo[house][HouseLock] = 1;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
}
if (slot == 2)
{
if (PlayerInfo[playerid][pHouseKey2] == -1) return SendClientMessage(playerid, GREY, " You don't own a house in that slot.");
if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house_2][HouseEnterX], HouseInfo[house_2][HouseEnterY], HouseInfo[house_2][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house_2][HouseInsideX], HouseInfo[house_2][HouseInsideY], HouseInfo[house_2][HouseInsideZ]))
{
SendClientMessage(playerid, GREY, " You are not near/inside your house.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(HouseInfo[house_2][HouseLock] == 1)
{
HouseInfo[house_2][HouseLock] = 0;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
else
{
HouseInfo[house_2][HouseLock] = 1;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
}
if (slot == 3)
{
if (PlayerInfo[playerid][pHouseKey3] == -1) return SendClientMessage(playerid, GREY, " You don't own a house in that slot.");
if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house_3][HouseEnterX], HouseInfo[house_3][HouseEnterY], HouseInfo[house_3][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house_3][HouseInsideX], HouseInfo[house_3][HouseInsideY], HouseInfo[house_3][HouseInsideZ]))
{
SendClientMessage(playerid, GREY, " You are not near/inside your house.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(HouseInfo[house_3][HouseLock] == 1)
{
HouseInfo[house_3][HouseLock] = 0;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
else
{
HouseInfo[house_3][HouseLock] = 1;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
}
if (slot == 4)
{
if (PlayerInfo[playerid][pHouseKey4] == -1) return SendClientMessage(playerid, GREY, " You don't own a house in that slot.");
if(!IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[house_4][HouseEnterX], HouseInfo[house_4][HouseEnterY], HouseInfo[house_4][HouseEnterZ]) && !IsPlayerInRangeOfPoint(playerid, 30.0, HouseInfo[house_4][HouseInsideX], HouseInfo[house_4][HouseInsideY], HouseInfo[house_4][HouseInsideZ]))
{
SendClientMessage(playerid, GREY, " You are not near/inside your house.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(HouseInfo[house_4][HouseLock] == 1)
{
HouseInfo[house_4][HouseLock] = 0;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has unlocked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
else
{
HouseInfo[house_4][HouseLock] = 1;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s has locked the door to their house.", sendername);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
}
}
return 1;
}
tako je za sve komande vezano za kucu nece nista
Kodove iz scripte stavljaj u [ code ] Text [ /code ] (Samo spoj zagrade) i reci mi jesi proverio ono sto sam ti rekao ?