Tisztelt Fórumozók!
Mint tudjátok, ScoTT. vagyok, a Light Life szerepjáték szerver tulajdonosa. A szerver lassan kettõ hónapja fut. Ez idõ alatt, sok bombázást kaptam, hogy LittleTown edit, LittleTown modból vettem mindent. A mai nap betelt a pohár. Olyan hülyeségekbe kötöttek bele, hogy az már fáj. Mint már írtam, LittleTown módból egyetlen egy dolgot vettem ki, a ház rendszert. Nem tudom, nem igazán kellene LittleTownos kódokat kiraknom, ezért csak pár dolgot teszek ki.
Kezdeném az includekkal. LittleTown include:
#include <a_samp>
//#include <dudb>
#include <dutils>
#include <dini>
#include <file>
#include <time>
#include <utils>
#include <Y_objects>
#include <audio>
#include <a_sampmysql>
#include <strtok>
/*#include <core>
#include <float>
#include <morphinc>
#include <streamer>
#include <a_npc>*/
Light Life include:
#include <a_samp>
#include <dudb>
#include <dini>
#include <sscanf>
#include <streamer>
#include <progress>
#include <opsp>
#include <a_mysql>
#define ENABLE_ZCMD
#include <fixchars>
#include <seif_walk>
#include <keypad>
Eddig remélem mindenkinek tiszta. Második dolog, a kocsirendszer. LittleTown modban annyi kocsibeolvasás van, hogy az hihetetlen, csak 1et tennék ide.
public LoadVehiclesPos() //betöltés
{
new arrCoords[12][32];
new strFromFile2[256];
new Float:vx,Float:vy,Float:vz,Float:vangle,Float:health,color1,color2,vehicleid,jarmuid;
for(new v=1; v<szalon+1; v++)
{
printf(\"%d ID autó beolvasása...\\r\\n\",v);
format(stringx, sizeof(stringx), \"autok/%d.txt\", v);
new File: vkfile2 = fopen(stringx, io_readwrite);
fread(vkfile2, strFromFile2);
printf(\"%d ID autó beolvasása sikeres\\r\\n\",v);
split(strFromFile2, arrCoords, \',\');
jarmuid = strval(arrCoords[0]);
vx = floatstr(arrCoords[1]);
vy = floatstr(arrCoords[2]);
vz = floatstr(arrCoords[3]);
vangle = floatstr(arrCoords[4]);
health = floatstr(arrCoords[5]);
color1 = strval(arrCoords[6]);
color2 = strval(arrCoords[7]);
kocsikulcsk[jarmuid] = strval(arrCoords[8]);
vehicleid = strval(arrCoords[9]);
szalonkeladva[v] = strval(arrCoords[10]);
strmid(rendszam[jarmuid], arrCoords[11], 0, strlen(arrCoords[11]), 255);
kocsiszink[jarmuid] = color1;
kocsiszin2k[jarmuid] = color2;
new a = AddStaticVehicleEx(vehicleid, vx,vy,vz,vangle,color1,color2,600);
SetVehicleHealth(a, health);
//SetVehicleNumberPlate(a, rendszam[jarmuid]);
fclose(vkfile2);
}
return 1;
}
Light Life:
stock kocsiolvas(vehicleid)
{
if(vehicleid > 56)
{
new file[128];
format(file,sizeof(file),\"autok/%d.ini\",vehicleid);
if(!dini_Exists(file))
{
dini_Create(file);
DestroyVehicle(vehicleid);
CreateVehicle(465,2685.6843,3454.8240,-1.5366,349.5987,0,0,1000);
printf(\"%d kocsi torolt betoltve.\",vehicleid);
benya[vehicleid] = 0;
rendszam[vehicleid] = \"0\";
zarva[vehicleid] = 0;
radioo[vehicleid] = 0;
billa[vehicleid] = 0;
eladva[vehicleid] = 0;
color1[vehicleid] = 0;
color2[vehicleid] = 0;
}
else
{
model = dini_Int(file,\"model\");
kx = dini_Float(file,\"x\");
ky = dini_Float(file,\"y\");
kz = dini_Float(file,\"z\");
angle = dini_Int(file,\"angle\");
color1[vehicleid] = dini_Int(file,\"color1\");
color2[vehicleid] = dini_Int(file,\"color2\");
aa = dini_Int(file,\"tores1\");
b = dini_Int(file,\"tores2\");
c = dini_Int(file,\"tores3\");
d = dini_Int(file,\"tores4\");
hp = dini_Float(file,\"hp\");
CreateVehicle(model,kx,ky,kz,angle,color1[vehicleid],color2[vehicleid],1000);
SetVehicleZAngle(vehicleid, angle);
UpdateVehicleDamageStatus(vehicleid, aa,b,c,d);
SetVehicleHealth(vehicleid,hp);
benya[vehicleid] = dini_Int(file,\"benya\");
SetVehicleNumberPlate(vehicleid, dini_Get(file,\"rendszam\"));
rendszam[vehicleid] = dini_Get(file,\"rendszam\");
zarva[vehicleid] = dini_Int(file,\"zarva\");
radioo[vehicleid] = dini_Int(file,\"radio\");
billa[vehicleid] = dini_Int(file,\"billa\");
eladva[vehicleid] = dini_Int(file,\"eladva\");
for(new i = 0; i < MAX_PLAYERS;i++)
{
if(zarva[vehicleid] == 0)
{
SetVehicleParamsForPlayerEx(vehicleid,i,0,0);
}
else if(zarva[vehicleid] == 1)
{
SetVehicleParamsForPlayerEx(vehicleid,i,0,1);
}
}
if(eladva[vehicleid] == 0)
{
DestroyVehicle(vehicleid);
CreateVehicle(465,2685.6843,3454.8240,-1.5366,349.5987,color1[vehicleid],color2[vehicleid],1000);
}
}
}
}
Oké, ez is rendben. Jöjjön a /szolgálat parancs. LittleTown:
if(strcmp(cmd, \"/szolgálat\", true) == 0 || strcmp(cmd, \"/szolgalat\", true) == 0)
{
printf(\"%s beírta a /szolgálat parancsot\\r\\n\", PlayerName(playerid));
if(Info[playerid][leaderes] == 3)
{
if(Info[playerid][szolgalat] == 0)
{
SetPlayerSkin(playerid, 275);
Info[playerid][skin] = GetPlayerSkin(playerid);
msg(playerid, \"Szolgálatba álltál.\");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(stringx, sizeof(stringx), \"%s mentõfõnök szolgálatba állt. (/104) a mentõhíváshoz.\", sendername);
SendClientMessageToAll(COLOR_GREEN, stringx);
Info[playerid][szolgalat] = 1;
return 1;
}
if(Info[playerid][szolgalat] == 1)
{
msg(playerid, \"Kiléptél szolgálatból!\");
Info[playerid][szolgalat] = 0;
return 1;
}
}
Tudom, hogy csak egy része. LightLife:
CMD:szolgalat(playerid, params[])
{
printf(\"%s beirta a /szolgalat parancsot.\",JatekosNeve(playerid));
if(PlayerInfo[playerid][Munka] == 1)
{
if(szolizik[playerid] == 0)
{
if(PlayerInfo[playerid][nem] == 0)
{
GetPlayerName(playerid, nev, 24);
format(string, 128, \"%s mentõfõnök szolgálatba állt. Hívásához: /112.\", nev);
SendClientMessageToAll(COLOR_GREEN, string);
SetPlayerSkin(playerid, 275);
szolizik[playerid] = 1;
}
if(PlayerInfo[playerid][nem] == 1)
{
GetPlayerName(playerid, nev, 24);
format(string, 128, \"%s mentõfõnök szolgálatba állt. Hívásához: /112.\", nev);
SendClientMessageToAll(COLOR_GREEN, string);
SetPlayerSkin(playerid, 275);
szolizik[playerid] = 1;
}
if(PlayerInfo[playerid][nem] == 2)
{
GetPlayerName(playerid, nev, 24);
format(string, 128, \"%s mentõfõnök szolgálatba állt. Hívásához: /112.\", nev);
SendClientMessageToAll(COLOR_GREEN, string);
SetPlayerSkin(playerid, 233);
szolizik[playerid] = 1;
}
}
else if(szolizik[playerid] == 1)
{
SendClientMessage(playerid,COLOR_GREEN, \"Kiléptél a szolgálatból.\");
SetPlayerSkin(playerid, PlayerInfo[playerid][skin]);
szolizik[playerid] = 0;
}
return 1;
}
Ez sem a teljes.
Ez már csak hab a tortán: Abba is belekötnek, hogy van /mentõleader parancs.
Köszönöm annak, aki elolvasta, és remélem, hogy nem fogja többet rámondani a szerveremre, hogy LittleTown átirat.
Edit:
Ott van pl. Desert Towns - LittleTown. Arról is az terjedt, hogy DT az LT edit, erre kiderült, hogy GF....