Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Üzenetek - N@rbirock

Oldalak: 1 ... 98 99 [100] 101 102 ... 133
1486
Segítségkérés / Scripter!
« Dátum: 2011. december 04. - 14:34:16 »

1487
Segítségkérés / Scripter!
« Dátum: 2011. december 04. - 14:29:38 »
ezt nem ide kell írni  :P

1488
SA-MP: Szerverfejlesztés / Rádiók[0.3d]
« Dátum: 2011. december 04. - 14:28:56 »
de d-t használok

1489
SA-MP: Szerverfejlesztés / Rádiók[0.3d]
« Dátum: 2011. december 04. - 14:06:36 »
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(7) : error 025: function heading differs from prototype
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(7) : error 029: invalid expression, assumed zero
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(9) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(13) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(15) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(18) : error 025: function heading differs from prototype
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(18) : error 029: invalid expression, assumed zero
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(20) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(22) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(24) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(26) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(27) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(28) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(29) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(30) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(31) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(32) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(33) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(36) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(41) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
20 Errors.

 
error

1490
Segítségkérés / Checkpoint hibakód
« Dátum: 2011. december 04. - 09:35:53 »
kivetem de most is
 
SA-MP 0.3d
Exception At Address: 0x0071A190
Registers:
EAX: 0x00000000   EBX: 0x00BAAF00   ECX: 0x00000000   EDX: 0x00000183
ESI: 0x00233FFF   EDI: 0x43C80000   EBP: 0x00BAAF40   ESP: 0x0022FA38
EFLAGS: 0x00010297
Stack:
+0000: 0x00BAAF57   0x00BAAF00   0x0022FA60   0x00000000
+0010: 0x729E4B7E   0x206B656C   0x6A729856   0x00000021
+0020: 0x00000000   0x00000000   0x00000000   0x00000000
+0030: 0x00000000   0x00000000   0x00000000   0x00000000
+0040: 0x00000000   0x00000000   0x00000000   0x00000000
+0050: 0x00000000   0x00000000   0x00000000   0x00000000
+0060: 0x00000000   0x00000000   0x00000000   0x00000000
+0070: 0x00000000   0x00000000   0x00000000   0x00000000
+0080: 0x00000000   0x00000000   0x00000000   0x00000000
+0090: 0x00000000   0x00000000   0x00000000   0x00000000
+00A0: 0x00000000   0x00000000   0x00000000   0x00000000
+00B0: 0x00000000   0x00000000   0x00000000   0x00000000
+00C0: 0x00000000   0x00000000   0x00000000   0x00000000
+00D0: 0x00000000   0x00000000   0x00000000   0x00000000
+00E0: 0x00000000   0x00000000   0x00000000   0x00000000
+00F0: 0x00000000   0x00000000   0x00000000   0x00000000
+0100: 0x00000000   0x00000000   0x00000000   0x00000000
+0110: 0x00000000   0x00000000   0x00000000   0x00000000
+0120: 0x00000000   0x00000000   0x00000000   0x00000000
+0130: 0x00000000   0x00000000   0x00000000   0x00000000
+0140: 0x00000000   0x00000000   0x00000000   0x00000000
+0150: 0x00000000   0x00000000   0x00000000   0x00000000
+0160: 0x00000000   0x00000000   0x00000000   0x00000000
+0170: 0x00000000   0x00000000   0x00000000   0x00000000
+0180: 0x00000000   0x00000000   0x00000000   0x00000000
+0190: 0x00000000   0x00000000   0x00000000   0x00000000
+01A0: 0x0071A2AA   0x00BAAF57   0x00000000   0x00000000
+01B0: 0x43C80000   0x43915000   0x760580E0   0x00BAAF40
+01C0: 0x526E8713   0x42D98000   0xBEC08000   0x00000000
+01D0: 0x42D98000   0x00000004   0x43915000   0x42D98000
+01E0: 0x452879FC   0xFFE1E1E1   0x00000001   0x00000001
+01F0: 0x00724D4F   0x00C7DE28   0x00C7DDF8   0x00725921
+0200: 0x45336F90   0x446AAF13   0x412BC5B6   0x40000000
+0210: 0x00BA873E   0xF4A460FF   0x760580E0   0x00000001
+0220: 0x01826830   0x00000000   0x45336F90   0x446AAF13
+0230: 0x412BC5B6   0x452879FC   0xC4D51604   0x412D8106
+0240: 0x00000000   0x00B7CD98   0x0000021B   0x0072859C
+0250: 0x00000001   0x00000000   0x00000005   0x00C80468
+0260: 0x00000004   0x00584954   0x00000000   0x4401211B
+0270: 0x42CFAE04   0x44021465   0x00725BF5   0x00020001
SCM Op: 0x470, lDbg: 0
Game Version: US 1.0
State Information: Ped Context: 0

1491
Archívum / Az új Lokális Moderátorok
« Dátum: 2011. december 04. - 09:31:54 »
grat nektek

1492
Fórum Archívum (Témák/Fórumok) / Re:Mozgo Object Készités.
« Dátum: 2011. december 04. - 09:14:02 »
és a [pawn ][ /pawn] cod hol marat

1493
Segítségkérés / Checkpoint hibakód
« Dátum: 2011. december 04. - 09:12:31 »
már megcsináltam de csak az én szerveremen csinálja ezt

1494
Segítségkérés / Checkpoint hibakód
« Dátum: 2011. december 04. - 09:03:20 »
SA-MP 0.3d
Exception At Address: 0x0071A190
Registers:
EAX: 0x00000000   EBX: 0x00BAAF00   ECX: 0x00000000   EDX: 0x00000183
ESI: 0x00233FFF   EDI: 0x43C80000   EBP: 0x00BAAF40   ESP: 0x0022FA38
EFLAGS: 0x00010297
Stack:
+0000: 0x00BAAF59   0x00BAAF00   0x0022FA60   0x00000000
+0010: 0x729E4B7E   0x206B656C   0x6A729856   0x00000021
+0020: 0x00000000   0x00000000   0x00000000   0x00000000
+0030: 0x00000000   0x00000000   0x00000000   0x00000000
+0040: 0x00000000   0x00000000   0x00000000   0x00000000
+0050: 0x00000000   0x00000000   0x00000000   0x00000000
+0060: 0x00000000   0x00000000   0x00000000   0x00000000
+0070: 0x00000000   0x00000000   0x00000000   0x00000000
+0080: 0x00000000   0x00000000   0x00000000   0x00000000
+0090: 0x00000000   0x00000000   0x00000000   0x00000000
+00A0: 0x00000000   0x00000000   0x00000000   0x00000000
+00B0: 0x00000000   0x00000000   0x00000000   0x00000000
+00C0: 0x00000000   0x00000000   0x00000000   0x00000000
+00D0: 0x00000000   0x00000000   0x00000000   0x00000000
+00E0: 0x00000000   0x00000000   0x00000000   0x00000000
+00F0: 0x00000000   0x00000000   0x00000000   0x00000000
+0100: 0x00000000   0x00000000   0x00000000   0x00000000
+0110: 0x00000000   0x00000000   0x00000000   0x00000000
+0120: 0x00000000   0x00000000   0x00000000   0x00000000
+0130: 0x00000000   0x00000000   0x00000000   0x00000000
+0140: 0x00000000   0x00000000   0x00000000   0x00000000
+0150: 0x00000000   0x00000000   0x00000000   0x00000000
+0160: 0x00000000   0x00000000   0x00000000   0x00000000
+0170: 0x00000000   0x00000000   0x00000000   0x00000000
+0180: 0x00000000   0x00000000   0x00000000   0x00000000
+0190: 0x00000000   0x00000000   0x00000000   0x00000000
+01A0: 0x0071A2AA   0x00BAAF59   0x00000000   0x00000000
+01B0: 0x43C80000   0x43915000   0x760580E0   0x00BAAF40
+01C0: 0x006E8713   0x42D98000   0xBEC08000   0x00000000
+01D0: 0x42D98000   0x00000004   0x43915000   0x42D98000
+01E0: 0x452879FC   0xFFE1E1E1   0x00000001   0x00000001
+01F0: 0x00724D4F   0x00C7DE28   0x00C7DDF8   0x00725921
+0200: 0x442FA161   0xC3E6F8A9   0x418AAC09   0x40000000
+0210: 0x00BA873E   0xF4A460FF   0x760580E0   0x00000001
+0220: 0x01DD6830   0x00000000   0x442FA161   0xC3E6F8A9
+0230: 0x418AAC09   0x452879FC   0xC4D51604   0x412D8106
+0240: 0x00000000   0x00B7CD98   0x0000021B   0x0072859C
+0250: 0x00000001   0x00000000   0x00000005   0x00C80468
+0260: 0x00000004   0x00584954   0x00000000   0x4401161A
+0270: 0x42D0060F   0x44021A75   0x00725BF5   0x00020001
SCM Op: 0x470, lDbg: 0
Game Version: US 1.0
State Information: Ped Context: 0

 
Kamionos szerverem van, és amikor belemegyek a checkpointba ezt a hibakód sort írja ki.
Segítsetek!
[mod]Máskor témára utaló nevet adj a témának![/mod]

1495
SA-MP: Szerverfejlesztés / Rádió 0.3d RC1 [1. Magyar 0.3d FS]
« Dátum: 2011. december 04. - 08:53:26 »
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(11) : error 001: expected token: \")\", but found \"&\"
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(11) : error 001: expected token: \";\", but found \"&\"
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(14) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(18) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(25) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(28) : error 001: expected token: \")\", but found \"&\"
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(28) : error 001: expected token: \";\", but found \"&\"
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(30) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(33) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(35) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(39) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(66) : error 025: function heading differs from prototype
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(66) : error 029: invalid expression, assumed zero
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(68) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(70) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(72) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(75) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(79) : error 054: unmatched closing brace (\"}\")
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(80) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(88) : error 054: unmatched closing brace (\"}\")
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(89) : error 010: invalid function or declaration
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(93) : error 054: unmatched closing brace (\"}\")
D:\\Trucking_Server_2.0\\filterscripts\\radio.pwn(96) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
23 Errors.

 
0.3d-n

1496
Segítségkérés / Rádió 0.3c-hez
« Dátum: 2011. december 03. - 22:27:21 »
de ott meni fognak a scriptek és a mod?

1497
Szkript kérések / Admin
« Dátum: 2011. december 03. - 19:35:37 »
Az RCON adminokat mutassa, vagy van saját adminrendszered?

1498
Segítségkérés / Rádió 0.3c-hez
« Dátum: 2011. december 03. - 19:34:40 »
0.3d-hez látam rádiót de van 0.3c-hez is?

1499
Beszélgetés / III. Xmas Party Szerver -> Admin felvétel
« Dátum: 2011. december 03. - 12:28:09 »
jelentkeznék
korom:14
samp: kb 3 év még a 0.3c-n keztem
admin tapasztalat van elég
és segitetem neked a weboldalba

1500
Szkript kérések / LS lift script (2) SüRgÕs!
« Dátum: 2011. december 03. - 11:34:00 »
[pawn]/*
*   Example elevator system for the new LS building.
*
*   Zamaroht 2010
*/
// Warning: This script uses a total of 45 objects, 22 3D Text Labels and 1 dialog.
#include <a_samp>
#define ELEVATOR_SPEED      (5.0)   // Movement speed of the elevator.
#define DOORS_SPEED         (4.0)   // Movement speed of the doors.
#define ELEVATOR_WAIT_TIME  (5000)  // Time in ms that the elevator will wait in each floor before continuing with the queue.
                        // Be sure to give enough time for doors to open.
#define DIALOG_ID           (874)
// Private:
#define X_DOOR_CLOSED       (1786.627685)
#define X_DOOR_R_OPENED     (1785.027685)
#define X_DOOR_L_OPENED     (1788.227685)
#define GROUND_Z_COORD      (14.511476)
#define ELEVATOR_OFFSET     (0.059523)
/* ------------------
// Constants:
-------------------*/
static FloorNames[21][] =
{
\"Ground Floor\",
\"First Floor\",
\"Second Floor\",
\"Third Floor\",
\"Fourth Floor\",
\"Fifth Floor\",
\"Sixth Floor\",
\"Seventh Floor\",
\"Eighth Floor\",
\"Ninth Floor\",
\"Tenth Floor\",
\"Eleventh Floor\",
\"Twelfth Floor\",
\"Thirteenth Floor\",
\"Fourteenth Floor\",
\"Fifteenth Floor\",
\"Sixteenth Floor\",
\"Seventeenth Floor\",
\"Eighteenth Floor\",
\"Nineteenth Floor\",
\"Penthouse\"
};
static Float:FloorZOffsets[21] =
{
    0.0,      // 0.0,
    8.5479,      // 8.5479,
    13.99945,   // 8.5479 + (5.45155 * 1.0),
    19.45100,   // 8.5479 + (5.45155 * 2.0),
    24.90255,   // 8.5479 + (5.45155 * 3.0),
    30.35410,   // 8.5479 + (5.45155 * 4.0),
    35.80565,   // 8.5479 + (5.45155 * 5.0),
    41.25720,   // 8.5479 + (5.45155 * 6.0),
    46.70875,   // 8.5479 + (5.45155 * 7.0),
    52.16030,   // 8.5479 + (5.45155 * 8.0),
    57.61185,   // 8.5479 + (5.45155 * 9.0),
    63.06340,   // 8.5479 + (5.45155 * 10.0),
    68.51495,   // 8.5479 + (5.45155 * 11.0),
    73.96650,   // 8.5479 + (5.45155 * 12.0),
    79.41805,   // 8.5479 + (5.45155 * 13.0),
    84.86960,   // 8.5479 + (5.45155 * 14.0),
    90.32115,   // 8.5479 + (5.45155 * 15.0),
    95.77270,   // 8.5479 + (5.45155 * 16.0),
    101.22425,  // 8.5479 + (5.45155 * 17.0),
    106.67580,   // 8.5479 + (5.45155 * 18.0),
    112.12735   // 8.5479 + (5.45155 * 19.0)
};
/* ------------------
// Variables:
-------------------*/
new Obj_Elevator, Obj_ElevatorDoors[2],
Obj_FloorDoors[21][2];
new Text3D:Label_Elevator, Text3D:Label_Floors[21];
#define ELEVATOR_STATE_IDLE     (0)
#define ELEVATOR_STATE_WAITING  (1)
#define ELEVATOR_STATE_MOVING   (2)
new ElevatorState,
ElevatorFloor;  // If Idle or Waiting, this is the current floor. If Moving, the floor it\'s moving to.
#define INVALID_FLOOR           (-1)
new ElevatorQueue[21],     // Floors in queue.
FloorRequestedBy[21];   // FloorRequestedBy[floor_id] = playerid; - Points out who requested which floor.
new ElevatorBoostTimer;     // Timer that makes the elevator move faster after players start surfing the object.
/* ------------------
*  Function forwards:
-------------------*/
// Public:
forward CallElevator(playerid, floorid);    // You can use INVALID_PLAYER_ID too.
forward ShowElevatorDialog(playerid);
// Private:
forward Elevator_Initialize();
forward Elevator_Destroy();
forward Elevator_OpenDoors();
forward Elevator_CloseDoors();
forward Floor_OpenDoors(floorid);
forward Floor_CloseDoors(floorid);
forward Elevator_MoveToFloor(floorid);
forward Elevator_Boost(floorid);           // Increases the elevator speed until it reaches \'floorid\'.
forward Elevator_TurnToIdle();
forward ReadNextFloorInQueue();
forward RemoveFirstQueueFloor();
forward AddFloorToQueue(floorid);
forward IsFloorInQueue(floorid);
forward ResetElevatorQueue();
forward DidPlayerRequestElevator(playerid);
forward Float:GetElevatorZCoordForFloor(floorid);
forward Float:GetDoorsZCoordForFloor(floorid);
// ------------------------ Callbacks ------------------------
public OnFilterScriptInit()
{
ResetElevatorQueue();
Elevator_Initialize();
return 1;
}
public OnFilterScriptExit()
{
Elevator_Destroy();
return 1;
}
public OnObjectMoved(objectid)
{
    new Float:x, Float:y, Float:z;
for(new i; i < sizeof(Obj_FloorDoors); i ++)
{
   if(objectid == Obj_FloorDoors
  • )


   {


       GetObjectPos(Obj_FloorDoors
  • , x, y, z);


       if(x < X_DOOR_L_OPENED - 0.5)   // Some floor doors have shut, move the elevator to next floor in queue:


       {


         Elevator_MoveToFloor(ElevatorQueue[0]);


         RemoveFirstQueueFloor();


      }


   }


}


if(objectid == Obj_Elevator)   // The elevator reached the specified floor.


{


    KillTimer(ElevatorBoostTimer);  // Kills the timer, in case the elevator reached the floor before boost.


    FloorRequestedBy[ElevatorFloor] = INVALID_PLAYER_ID;


    Elevator_OpenDoors();


    Floor_OpenDoors(ElevatorFloor);


    GetObjectPos(Obj_Elevator, x, y, z);


    Label_Elevator   = Create3DTextLabel(\"Press \'F\' to use elevator\", 0xFFFFDD, 1784.9822, -1302.0426, z - 0.9, 4.0, 0, 1);


    ElevatorState    = ELEVATOR_STATE_WAITING;


    SetTimer(\"Elevator_TurnToIdle\", ELEVATOR_WAIT_TIME, 0);


}


return 1;


}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])


{


    if(dialogid == DIALOG_ID)


    {


        if(!response)


            return 0;


        if(FloorRequestedBy[listitem] != INVALID_PLAYER_ID || IsFloorInQueue(listitem))


            GameTextForPlayer(playerid, \"~r~The floor is already in the queue\", 3500, 4);


   else if(DidPlayerRequestElevator(playerid))


       GameTextForPlayer(playerid, \"~r~You already requested the elevator\", 3500, 4);


   else


        CallElevator(playerid, listitem);


   return 1;


    }


return 0;


}


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)


{


if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_SECONDARY_ATTACK)


{


    new Float:pos[3];


    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);


    if(pos[1] < -1301.4 && pos[1] > -1303.2417 && pos[0] < 1786.2131 && pos[0] > 1784.1555)    // He is using the elevator button


        ShowElevatorDialog(playerid);


   else    // Is he in a floor button?


   {


       if(pos[1] > -1301.4 && pos[1] < -1299.1447 && pos[0] < 1785.6147 && pos[0] > 1781.9902)


       {


           // He is most likely using it, check floor:


         new i=20;


         while(pos[2] < GetDoorsZCoordForFloor(i) + 3.5 && i > 0)


             i --;


         if(i == 0 && pos[2] < GetDoorsZCoordForFloor(0) + 2.0)


             i = -1;


         if(i <= 19)


         {


            CallElevator(playerid, i + 1);


            GameTextForPlayer(playerid, \"~r~Elevator called\", 3500, 4);


         }


       }


   }


}


return 1;


}


// ------------------------ Functions ------------------------


stock Elevator_Initialize()


{


// Initializes the elevator.


Obj_Elevator          = CreateObject(18755, 1786.678100, -1303.459472, GROUND_Z_COORD + ELEVATOR_OFFSET, 0.000000, 0.000000, 270.000000);


Obj_ElevatorDoors[0]    = CreateObject(18757, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);


Obj_ElevatorDoors[1]    = CreateObject(18756, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);


Label_Elevator          = Create3DTextLabel(\"Press \'F\' to use elevator\", 0xFFFFDD, 1784.9822, -1302.0426, 13.6491, 4.0, 0, 1);


new string[128],


   Float:z;


for(new i; i < sizeof(Obj_FloorDoors); i ++)


{


    Obj_FloorDoors
  •    = CreateObject(18757, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);


   Obj_FloorDoors
[1]    = CreateObject(18756, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);

   format(string, sizeof(string), \"%s\\nPress \'F\' to call\", FloorNames
);

   if(i == 0)


       z = 13.4713;


   else


       z = 13.4713 + 8.7396 + ((i-1) * 5.45155);


   Label_Floors
         = Create3DTextLabel(string, 0xFFFFDD, 1783.9799, -1300.7660, z, 10.5, 0, 1);

   // Label_Elevator, Text3D:Label_Floors[21];


}


// Open ground floor doors:


Floor_OpenDoors(0);


Elevator_OpenDoors();


return 1;


}


stock Elevator_Destroy()


{


// Destroys the elevator.


DestroyObject(Obj_Elevator);


DestroyObject(Obj_ElevatorDoors[0]);


DestroyObject(Obj_ElevatorDoors[1]);


Delete3DTextLabel(Label_Elevator);


for(new i; i < sizeof(Obj_FloorDoors); i ++)


{


    DestroyObject(Obj_FloorDoors
  • );


   DestroyObject(Obj_FloorDoors
[1]);

   Delete3DTextLabel(Label_Floors
);

}


return 1;


}


stock Elevator_OpenDoors()


{


// Opens the elevator\'s doors.


new Float:x, Float:y, Float:z;


GetObjectPos(Obj_ElevatorDoors[0], x, y, z);


MoveObject(Obj_ElevatorDoors[0], X_DOOR_L_OPENED, y, z, DOORS_SPEED);


MoveObject(Obj_ElevatorDoors[1], X_DOOR_R_OPENED, y, z, DOORS_SPEED);


return 1;


}


stock Elevator_CloseDoors()


{


    // Closes the elevator\'s doors.


    if(ElevatorState == ELEVATOR_STATE_MOVING)


    return 0;


    new Float:x, Float:y, Float:z;


GetObjectPos(Obj_ElevatorDoors[0], x, y, z);


MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, y, z, DOORS_SPEED);


MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, y, z, DOORS_SPEED);


return 1;


}


stock Floor_OpenDoors(floorid)


{


    // Opens the doors at the specified floor.


    MoveObject(Obj_FloorDoors[floorid][0], X_DOOR_L_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);


MoveObject(Obj_FloorDoors[floorid][1], X_DOOR_R_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);


return 1;


}


stock Floor_CloseDoors(floorid)


{


    // Closes the doors at the specified floor.


    MoveObject(Obj_FloorDoors[floorid][0], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);


MoveObject(Obj_FloorDoors[floorid][1], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);


return 1;


}


stock Elevator_MoveToFloor(floorid)


{


// Moves the elevator to specified floor (doors are meant to be already closed).


ElevatorState = ELEVATOR_STATE_MOVING;


ElevatorFloor = floorid;


// Move the elevator slowly, to give time to clients to sync the object surfing. Then, boost it up:


MoveObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), 0.5);


    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.5);


    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.5);


    Delete3DTextLabel(Label_Elevator);


ElevatorBoostTimer = SetTimerEx(\"Elevator_Boost\", 2000, 0, \"i\", floorid);


return 1;


}


public Elevator_Boost(floorid)


{


// Increases the elevator\'s speed until it reaches \'floorid\'


MoveObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), ELEVATOR_SPEED);


    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);


    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);


return 1;


}


public Elevator_TurnToIdle()


{


ElevatorState = ELEVATOR_STATE_IDLE;


ReadNextFloorInQueue();


return 1;


}


stock RemoveFirstQueueFloor()


{


// Removes the data in ElevatorQueue[0], and reorders the queue accordingly.


for(new i; i < sizeof(ElevatorQueue) - 1; i ++)


    ElevatorQueue
= ElevatorQueue[i + 1];

ElevatorQueue[sizeof(ElevatorQueue) - 1] = INVALID_FLOOR;


return 1;


}


stock AddFloorToQueue(floorid)


{


    // Adds \'floorid\' at the end of the queue.


// Scan for the first empty space:


new slot = -1;


for(new i; i < sizeof(ElevatorQueue); i ++)


{


    if(ElevatorQueue
== INVALID_FLOOR)

    {


        slot = i;


        break;


    }


}


if(slot != -1)


{


    ElevatorQueue[slot] = floorid;


        // If needed, move the elevator.


    if(ElevatorState == ELEVATOR_STATE_IDLE)


        ReadNextFloorInQueue();


    return 1;


}


return 0;


}


stock ResetElevatorQueue()


{


// Resets the queue.


for(new i; i < sizeof(ElevatorQueue); i ++)


{


    ElevatorQueue
   = INVALID_FLOOR;

    FloorRequestedBy
= INVALID_PLAYER_ID;

}


return 1;


}


stock IsFloorInQueue(floorid)


{


// Checks if the specified floor is currently part of the queue.


for(new i; i < sizeof(ElevatorQueue); i ++)


    if(ElevatorQueue
== floorid)

        return 1;


return 0;


}


stock ReadNextFloorInQueue()


{


// Reads the next floor in the queue, closes doors, and goes to it.


if(ElevatorState != ELEVATOR_STATE_IDLE || ElevatorQueue[0] == INVALID_FLOOR)


    return 0;


Elevator_CloseDoors();


Floor_CloseDoors(ElevatorFloor);


return 1;


}


stock DidPlayerRequestElevator(playerid)


{


for(new i; i < sizeof(FloorRequestedBy); i ++)


    if(FloorRequestedBy
== playerid)

        return 1;


return 0;


}


stock ShowElevatorDialog(playerid)


{


new string[512];


for(new i; i < sizeof(ElevatorQueue); i ++)


{


    if(FloorRequestedBy
!= INVALID_PLAYER_ID)

        strcat(string, \"{FF0000}\");


    strcat(string, FloorNames
);

    strcat(string, \"\\n\");


}


ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_LIST, \"Elevator\", string, \"Accept\", \"Cancel\");


return 1;


}


stock CallElevator(playerid, floorid)


{


// Calls the elevator (also used with the elevator dialog).


if(FloorRequestedBy[floorid] != INVALID_PLAYER_ID || IsFloorInQueue(floorid))


    return 0;


FloorRequestedBy[floorid] = playerid;


AddFloorToQueue(floorid);


return 1;


}


stock Float:GetElevatorZCoordForFloor(floorid)


    return (GROUND_Z_COORD + FloorZOffsets[floorid] + ELEVATOR_OFFSET); // A small offset for the elevator object itself.


stock Float:GetDoorsZCoordForFloor(floorid)


return (GROUND_Z_COORD + FloorZOffsets[floorid]);


[/pawn]


itt a script

Oldalak: 1 ... 98 99 [100] 101 102 ... 133
SimplePortal 2.3.7 © 2008-2024, SimplePortal