Here I will upload all...
Код:
#define MAX_TELEPORTS 1001 //You can edit this at any point..
enum teleportInfo
{
gTeleport,
TeleportName[32],
TeleportNameInside[32],
gStartVirtualWorld,
gEndVirtualWorld,
gEndInterior,
gStartInterior,
Float:gstartCX,
Float:gstartCY,
Float:gstartCZ,
Float:gendCX,
Float:gendCY,
Float:gendCZ
}
new TeleportInfo[MAX_TELEPORTS][teleportInfo];
Код:
stock CreateNewTeleport(hid)
{
new file[64];
format(file,sizeof(file),"teleports/teleport%d.txt",hid);
new Float: X, Float: Y, Float: Z, Float: SX, Float: SY, Float: SZ;
X = dini_Float(file,"startfloatx");
Y = dini_Float(file,"startfloaty");
Z = dini_Float(file,"startfloatz");
SX = dini_Float(file,"endfloatx");
SY = dini_Float(file,"endfloaty");
SZ = dini_Float(file,"endfloatz");
new R = dini_Int(file,"teleportid");
new Q = dini_Int(file,"startvirtualworld");
new W = dini_Int(file,"startinterior");
new QQ = dini_Int(file,"endtinterior");
new WW = dini_Int(file,"endtvirtualworld");
if(dini_Exists(file))
{
TeleportInfo[hid][gStartVirtualWorld] = Q;
TeleportInfo[hid][gStartInterior] = W;
TeleportInfo[hid][gEndVirtualWorld] = WW;
TeleportInfo[hid][gEndInterior] = QQ;
TeleportInfo[hid][gTeleport] = R;
TeleportInfo[hid][gstartCX] = X;
TeleportInfo[hid][gstartCY] = Y;
TeleportInfo[hid][gstartCZ] = Z;
TeleportInfo[hid][gendCX] = SX;
TeleportInfo[hid][gendCY] = SY;
TeleportInfo[hid][gendCZ] = SZ;
new string[256];
new string2[256];
format(string, sizeof(string), "{228B22}[ {FFFFFF}%s (%d){228B22} ]",TeleportInfo[hid][TeleportName], hid);
format(string2, sizeof(string2), "{228B22}[ {FFFFFF}%s (%d){228B22} ]",TeleportInfo[hid][TeleportName], hid);
TeleportInfo[hid][TeleportName] = CreateDynamic3DTextLabel(string, 0xFFFFFFFF, TeleportInfo[hid][gstartCX], TeleportInfo[hid][gstartCY], TeleportInfo[hid][gstartCZ], 10);
TeleportInfo[hid][TeleportNameInside] = CreateDynamic3DTextLabel(string2, 0xFFFFFFFF, TeleportInfo[hid][gendCX], TeleportInfo[hid][gendCY], TeleportInfo[hid][gendCZ], 10);
}
print("Teleports loaded successfully.");
return 1;
}
stock LoadTeleports()
{
new file[64];
for(new hid=0; hid<=MAX_TELEPORTS; hid++)
{
format(file,sizeof(file),"teleports/teleport%d.txt",hid);
new Float: X, Float: Y, Float: Z, Float: SX, Float: SY, Float: SZ;
X = dini_Float(file,"startfloatx");
Y = dini_Float(file,"startfloaty");
Z = dini_Float(file,"startfloatz");
SX = dini_Float(file,"endfloatx");
SY = dini_Float(file,"endfloaty");
SZ = dini_Float(file,"endfloatz");
new R = dini_Int(file,"teleportid");
new Q = dini_Int(file,"startvirtualworld");
new W = dini_Int(file,"endinterior");
new QQ = dini_Int(file,"endtinterior");
new WW = dini_Int(file,"endtvirtualworld");
if(dini_Exists(file))
{
TeleportInfo[hid][gTeleport] = R;
TeleportInfo[hid][gStartVirtualWorld] = Q;
TeleportInfo[hid][gStartInterior] = W;
TeleportInfo[hid][gEndVirtualWorld] = WW;
TeleportInfo[hid][gEndInterior] = QQ;
TeleportInfo[hid][gstartCX] = X;
TeleportInfo[hid][gstartCY] = Y;
TeleportInfo[hid][gstartCZ] = Z;
TeleportInfo[hid][gendCX] = SX;
TeleportInfo[hid][gendCY] = SY;
TeleportInfo[hid][gendCZ] = SZ;
new string[256];
new string2[256];
format(string, sizeof(string), "{228B22}[ {FFFFFF}%s (%d){228B22} ]",TeleportInfo[hid][TeleportName], hid);
format(string2, sizeof(string2), "{228B22}[ {FFFFFF}%s (%d){228B22} ]",TeleportInfo[hid][TeleportName], hid);
TeleportInfo[hid][TeleportName] = CreateDynamic3DTextLabel(string, 0xFFFFFFFF, TeleportInfo[hid][gstartCX], TeleportInfo[hid][gstartCY], TeleportInfo[hid][gstartCZ], 10);
TeleportInfo[hid][TeleportNameInside] = CreateDynamic3DTextLabel(string2, 0xFFFFFFFF, TeleportInfo[hid][gendCX], TeleportInfo[hid][gendCY], TeleportInfo[hid][gendCZ], 10);
}
}
print("Teleports loaded successfully.");
return 1;
}