Sziasztok.
Kaptam ismerõsömtõl egy módot.
Enne ka módnak az a baja hogy van egy olyan parancs hogy /épít
Ezzel eddig semmi gond nincs lerakja a házat minden jó.
Csak mikor restartolom a szervert akkor nem maradnak meg a házak. :/
Valakinek ötlet?.
if(strcmp(cmd, \"/épít\", true) == 0)
{
if(PlayerInfo[playerid][pJob] == 5 || Admin(playerid, 3))
{
new ureshaz = UresHazKereses();
if(ureshaz == -1)
{
format(string, sizeof(string), \"Max %d a megengedett ház!\", sizeof(HouseInfo));
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, \"HASZNÁLAT: /épít [JátékosID/NévRészlet] [interior id (1-4)]\");
return 1;
}
new plo;
plo = ReturnUser(tmp);
if(PlayerInfo[plo][pPhousekey] > 255)
{
SendClientMessage(playerid, COLOR_WHITE, \"Az illetõnek már van háza!\");
return 1;
}
new x_job[128];
x_job = strtok(cmdtext, idx);
if(!strlen(x_job))
{
SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /épít [JátékosID/NévRészlet] [interior id (1-4)]\");
return 1;
}
new nev[MAX_PLAYER_NAME];
GetPlayerName(playerid, nev, sizeof(nev));
new nev2[MAX_PLAYER_NAME];
GetPlayerName(plo, nev2, sizeof(nev2));
if(strcmp(x_job,\"1\",true) == 0)
{
if(PlayerInfo[playerid][Penz] >= 100000)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
PlayerInfo[plo][pPhousekey] = ureshaz;
HouseInfo[ureshaz][hEntrancex] = X;
HouseInfo[ureshaz][hEntrancey] = Y;
HouseInfo[ureshaz][hEntrancez] = Z;
HouseInfo[ureshaz][hExitx] = 271.884979;
HouseInfo[ureshaz][hExity] = 306.631988;
HouseInfo[ureshaz][hExitz] = 999.148437;
HouseInfo[ureshaz][hValue] = 100000;
HouseInfo[ureshaz][hOwner] = nev2;
HouseInfo[ureshaz][hInt] = 2;
HouseInfo[ureshaz][Van] = 1;
HouseInfo[ureshaz][hOwned] = 1;
format(string,sizeof(string),\"<< %s új házat épített. A Ház bejárata: %d to %f - %f - %f ára: %d >>\",nev,ureshaz,X,Y,Z,HouseInfo[ureshaz][hValue]);
SendTAdminMessage(COLOR_TULAJ,string);
PlayerInfo[playerid][Penz] -= 100000;
SafeGivePlayerMoney(playerid, -100000);
varoskassza += 100000;
Savevaroskassza();
SaveProperty();
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"Ez a ház eladó!\\n Ára %d$\\n (( /házvesz ))\",HouseInfo[h][hValue]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25,0,1);
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
if(HouseInfo[h][hOwned] == 1)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"A ház tulajdonosa:\\n %s\",HouseInfo[h][hOwner]);
haztulaj = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],35,0,1);
/*format(string1, sizeof(string), \"[OWNED BY]\\n%s\",HouseInfo[h][hOwner]);
Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);*/
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Nincs elég pénzed! (100.000$)\");
}
}
if(strcmp(x_job,\"2\",true) == 0)
{
if(PlayerInfo[playerid][Penz] >= 150000)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
PlayerInfo[plo][pPhousekey] = ureshaz;
HouseInfo[ureshaz][hEntrancex] = X;
HouseInfo[ureshaz][hEntrancey] = Y;
HouseInfo[ureshaz][hEntrancez] = Z;
HouseInfo[ureshaz][hExitx] = 2233.6057;
HouseInfo[ureshaz][hExity] = -1111.7039;
HouseInfo[ureshaz][hExitz] = 1050.8828;
HouseInfo[ureshaz][hValue] = 150000;
HouseInfo[ureshaz][hOwner] = nev2;
HouseInfo[ureshaz][hInt] = 5;
HouseInfo[ureshaz][Van] = 1;
HouseInfo[ureshaz][hOwned] = 1;
format(string,sizeof(string),\"<< %s új házat épített. A Ház bejárata: %d to %f - %f - %f ára: %d >>\",nev,ureshaz,X,Y,Z,HouseInfo[ureshaz][hValue]);
SendTAdminMessage(COLOR_TULAJ,string);
PlayerInfo[playerid][Penz] -= 150000;
SafeGivePlayerMoney(playerid, -150000);
varoskassza += 150000;
Savevaroskassza();
SaveProperty();
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"Ez a ház eladó!\\n Ára %d$\\n (( /házvesz ))\",HouseInfo[h][hValue]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25,0,1);
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
if(HouseInfo[h][hOwned] == 1)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"A ház tulajdonosa:\\n %s\",HouseInfo[h][hOwner]);
haztulaj = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],35,0,1);
/*format(string1, sizeof(string), \"[OWNED BY]\\n%s\",HouseInfo[h][hOwner]);
Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);*/
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Nincs elég pénzed! (150.000$)\");
}
}
if(strcmp(x_job,\"3\",true) == 0)
{
if(PlayerInfo[playerid][Penz] >= 200000)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
PlayerInfo[plo][pPhousekey] = ureshaz;
HouseInfo[ureshaz][hEntrancex] = X;
HouseInfo[ureshaz][hEntrancey] = Y;
HouseInfo[ureshaz][hEntrancez] = Z;
HouseInfo[ureshaz][hExitx] = 2214.8909;
HouseInfo[ureshaz][hExity] = -1076.0967;
HouseInfo[ureshaz][hExitz] = 1050.4844;
HouseInfo[ureshaz][hValue] = 200000;
HouseInfo[ureshaz][hOwner] = nev2;
HouseInfo[ureshaz][hInt] = 1;
HouseInfo[ureshaz][Van] = 1;
HouseInfo[ureshaz][hOwned] = 1;
format(string,sizeof(string),\"<< %s új házat épített. A Ház bejárata: %d to %f - %f - %f ára: %d >>\",nev,ureshaz,X,Y,Z,HouseInfo[ureshaz][hValue]);
SendTAdminMessage(COLOR_TULAJ,string);
PlayerInfo[playerid][Penz] -= 200000;
SafeGivePlayerMoney(playerid, -200000);
varoskassza += 200000;
Savevaroskassza();
SaveProperty();
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"Ez a ház eladó!\\n Ára %d$\\n (( /házvesz ))\",HouseInfo[h][hValue]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25,0,1);
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
if(HouseInfo[h][hOwned] == 1)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"A ház tulajdonosa:\\n %s\",HouseInfo[h][hOwner]);
haztulaj = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],35,0,1);
/*format(string1, sizeof(string), \"[OWNED BY]\\n%s\",HouseInfo[h][hOwner]);
Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);*/
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Nincs elég pénzed! (200.000$)\");
}
}
if(strcmp(x_job,\"4\",true) == 0)
{
if(PlayerInfo[playerid][Penz] >= 250000)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
PlayerInfo[plo][pPhousekey] = ureshaz;
HouseInfo[ureshaz][hEntrancex] = X;
HouseInfo[ureshaz][hEntrancey] = Y;
HouseInfo[ureshaz][hEntrancez] = Z;
HouseInfo[ureshaz][hExitx] = 2324.419921;
HouseInfo[ureshaz][hExity] = -1145.568359;
HouseInfo[ureshaz][hExitz] = 1050.710083;
HouseInfo[ureshaz][hValue] = 250000;
HouseInfo[ureshaz][hOwner] = nev2;
HouseInfo[ureshaz][hInt] = 12;
HouseInfo[ureshaz][Van] = 1;
HouseInfo[ureshaz][hOwned] = 1;
format(string,sizeof(string),\"<< %s új házat épített. A Ház bejárata: %d to %f - %f - %f ára: %d >>\",nev,ureshaz,X,Y,Z,HouseInfo[ureshaz][hValue]);
SendTAdminMessage(COLOR_TULAJ,string);
PlayerInfo[playerid][Penz] -= 250000;
SafeGivePlayerMoney(playerid, -250000);
varoskassza += 250000;
Savevaroskassza();
SaveProperty();
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"Ez a ház eladó!\\n Ára %d$\\n (( /házvesz ))\",HouseInfo[h][hValue]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25,0,1);
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
if(HouseInfo[h][hOwned] == 1)
{
format(stringx, sizeof(stringx), \"(( A ház idje: %d ))\",HouseInfo[h][hWorld]);
hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,25,0,1);
format(stringx, sizeof(stringx), \"A ház tulajdonosa:\\n %s\",HouseInfo[h][hOwner]);
haztulaj = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],35,0,1);
/*format(string1, sizeof(string), \"[OWNED BY]\\n%s\",HouseInfo[h][hOwner]);
Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);*/
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Nincs elég pénzed! (250.000$)\");
}
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD2,\"Nem vagy építész!\");
}
return 1;
}
Itt a pwn kódja.