22.11.2013, 00:09
(
Последний раз редактировалось Souji; 22.11.2013 в 01:03.
)
Hi, i'm noob scripting, and got hard to do it, tried a lot but i need help.
I got this script searching the forum, but I want to move 3 objects.
The other 2 objects is
I got this script searching the forum, but I want to move 3 objects.
The other 2 objects is
Код:
zsawall (Object ID 19359) closed ( 2658.9016, -1518.2900, 39.2486, 0.0000, 0.0000, 89.1446 ) opened ( 2660.2017, -1518.2900, 39.2486, 0.0000, 0.0000, 89.1446 ) //---------------------------------------------------------- zsadoorint - (Object ID 1537) closed ( 2657.27100, -1518.02466, 38.09280, 0.00000, 0.00000, -182.00000) opened ( 2658.5439, -1518.0027, 38.0928, 0.00000, 0.00000, -182.00000)
Код:
new zsabookcase, bool: zsabookcaseState ; //--------------------------------------------- zsabookcase = CreateObject( 14455,2662.2791, -1518.4174, 39.5401,0,0, 179.1134 ); // bookcase. zsabookcaseState = false; //---------------------------------------------- public OnPlayerCommandText( playerid, cmdtext[ ] ) { if ( !strcmp( cmdtext, "/7895123", true ) ) { if ( cmdtext[ 8 ] ) return false; if ( !IsPlayerInRangeOfPoint( playerid, 2.0, 2656.6663, -1518.6973, 39.1067 ) ) return SendClientMessage( playerid, -1, "You are not close enough." ); zsabookcaseState = ! zsabookcaseState; switch ( zsabookcaseState ) { case true : // True = Gate is opened MoveObject( zsabookcase, 2663.7615, -1518.4259, 39.4907, 1.0 ); default : // Else ( false ) = Gate is closed MoveObject( zsabookcase, 2662.2791, -1518.4174, 39.5401, 1.0 ); } SendClientMessage( playerid, -1, ( zsabookcaseState ) ? ( "ZSA - Access Granted" ) : ( "Closing Access" ) ); // ^ iGateState == true ^ Then ^ Gate is open ^ Else ^ Gate is closed return 1; } return 0; }