Letöltés:
http://www.solidfiles.com/d/998f304739/Commandok: (annak aki használni is szeretné a házat, nem csupán kívülrõl bámulni)
#define PRESSED(%0) \\
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
ezt a script elejére
----------------------------------------------------------------Teleport command--------------------------------------------------------------------------------------------
if (strcmp(\"/bonus house\", cmdtext, true, 10) == 0)
}
{
SetPlayerPos(playerid, 1038.6999511719, -185.19999694824, 29.89999961853);
}
return 0;
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------Ezzel nyílik az oszlop/titkos ajtó--------------------------------------------------------------------------------
new secret;
secret = CreateObject(3499,1039.59997559,-59.29999924,23.299999237061,0.00000000,0.00000000,0.00000000); //object(wdpillar02_lvs) (11)
ki hova teszi, nekem ez is az elején van
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/open\", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1039.5999755859, -59.900001525879, 23.5))
{
MoveObject(secret, 1039.5999755859, -59.299999237061, 17, 3);
SendClientMessage(playerid, 0xFFFFFFFF, \"Opened!\");
}
}
return 1;
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------Záródása---------------------------------------------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/close\", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1039.5999755859, -59.900001525879, 23.5))
{
MoveObject(secret, 1039.5999755859, -59.299999237061, 23.299999237061, 3);
SendClientMessage(playerid, 0xFFFFFFFF, \"Closed!\");
}
}
return 1;
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------AJTÓK----------------------------------------------------------------------------------------------------
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_WALK))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1037.9000244141, -67.599998474121, 22.60000038147))
{
{
SetPlayerPos(playerid, 1036.69921875, -65.8994140625, 23.60000038147);
}
}
else //bónusz házbol ki
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1036.69921875, -65.8994140625, 23.60000038147))
{
{
SetPlayerPos(playerid, 1037.9000244141, -67.599998474121, 22.60000038147);
}
}
else //barlangba be
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1054.8000488281, -51.099998474121, 26.89999961853))
{
{
SetPlayerPos(playerid, 1039.1999511719, -41.299999237061, -21.200000762939);
}
}
else //barlangból ki
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1039.1999511719, -41.299999237061, -21.200000762939))
{
{
SetPlayerPos(playerid, 1054.8000488281, -51.099998474121, 26.89999961853);
}
}
else //hajóhoz ki
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1053.59997559,-59.20000076,22.39999962))
{
{
SetPlayerPos(playerid, 1063.6999511719, -63.099998474121, 21);
}
}
else //hajótól be
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1062.67004395,-63.59999847,20.39999962))
{
{
SetPlayerPos(playerid, 1054.4000244141, -59.900001525879, 23);
}
}
}
return 1;
}
Várom a pozitív és negatív visszajelzéseket