evo dat cu vam sve posto nezz koja vam treba
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("STEFANS HOUSE SYSTEM");
print("--------------------------------------\n");
for(new i = 0; i <= MAX_PLAYERS; i++)
{
Timer = SetTimerEx("UcitajVikendice", 1000, true, "%i", i);
}
for(new st = 0; st <= MAX_VIKENDICA; st++) // Player Homes
{
LoadPlayerVikendica(st);
}
return true;
}
public SpremiVikendice(Vikendicaidid)
{
new Stan; format(Stan, sizeof(Stan), "/Stanovi/%d.dini.save", Stanid);
if(dini_Exists(Stan)){
dini_Set(Stan, "Name", StanInfo);
dini_IntSet(Stan, "For_Sell", StanInfo);
dini_IntSet(Stan, "Sell_Price", StanInfo);
dini_IntSet(Stan, "Rent_Price", StanInfo);
dini_IntSet(Stan, "Stan_Level", StanInfo);
dini_FloatSet(Stan, "Exit_Coord:X", StanInfo);
dini_FloatSet(Stan, "Exit_Coord:Y", StanInfo);
dini_FloatSet(Stan, "Exit_Coord:Z", StanInfo);
dini_IntSet(Stan, "VirtualWorld", StanInfo);
dini_IntSet(Stan, "Status", StanInfo);
}
return true;
}
public UcitajStanove(playerid)
{
new string, Stan;
for(new st = 0; st<= MAX_STANOVA; st++){
format(Stan, sizeof(Stan), "/Stanovi/%d.dini.save", st);
if(dini_Exists(Stan)){
if(StanInfo == 1){
if(PlayerToPoint(PTP_RADIUS, playerid, StanInfo, StanInfo, StanInfo)) {
format(string, sizeof(string), ""ZELENA"Stan na prodaji!\n"ZELENA"Vlasnik:"BIJELA" %s\n"ZELENA"Level:"BIJELA" %d\n"ZELENA"Cijena: "BIJELA"%d\n"ZELENA"Rent: "BIJELA"%d", StanInfo, StanInfo, StanInfo, StanInfo);
Create3DTextLabel(string,-1,StanInfo, StanInfo, StanInfo,13.0,0);
}
} else if(StanInfo == 0){
if(PlayerToPoint(PTP_RADIUS, playerid, StanInfo, StanInfo, StanInfo)) {
format(string, sizeof(string), ""ZELENA"Vlasnik: "BIJELA"%s\n"ZELENA"Level: "BIJELA"%d\n"ZELENA"Rent: "BIJELA"%d", StanInfo, StanInfo, StanInfo);
Create3DTextLabel(string,-1,StanInfo, StanInfo, StanInfo,13.0,0);
} } } }
}
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z);
if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{ return true; }
return false;
}
Ovoe stanove sam kopiro od Vanille i stavio sebi kao vikendice, samo sve ovo umjesto "STAN" izmjenio sam sa "VIKENDICA" jer nemam na ovom kompu skriptu