rendered paste bodynew gates before main() !
new gate;
new gate2;
new gate3;
new gate4;
new gate5;
public OnGameModeInit()
{
CreateObject ( 987, 96.8964, 1941.2626, 16.1764 , 0.0, 0.0, 180.0 );
CreateObject ( 987, 84.9964, 1941.2626, 16.1764 , 0.0, 0.0, 180.0 );
CreateObject ( 987, 73.0964, 1941.2626, 16.1764 , 0.0, 0.0, 180.0 );
CreateObject ( 987, 61.0638, 1941.2626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1929.3626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1917.4626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1905.5626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1893.6626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1881.7626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1869.8626, 16.1764 , 0.0, 0.0, 0.0 );
CreateObject ( 987, 61.0638, 1869.8626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1857.9626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1846.0626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1834.1626, 16.1764 , 0.0, 0.0, 270.0 );
CreateObject ( 987, 61.0638, 1822.2626, 16.1764 , 0.0, 0.0, 270.0 );
gate = CreateObject ( 985, 74.9110, 1869.6800, 15.9000 , 0.0, 0.0, 0.0 );
gate2 = CreateObject ( 985, 82.8300, 1869.6800, 15.9000 , 0.0, 0.0, 0.0 );
CreateObject ( 987, 84.7181, 1869.8626, 16.1764 , 0.0, 0.0, 0.0 );
CreateObject ( 987, 61.0638, 1810.3626, 16.1764 , 0.0, 0.0, 0.0 );
CreateObject ( 987, 84.7181, 1810.3626, 16.1764 , 0.0, 0.0, 0.0 );
gate3 = CreateObject( 985, 74.9110, 1810.1826, 15.9000 , 0.0, 0.0, 0.0 );
gate4 = CreateObject( 985, 82.8300, 1810.1826, 15.9000 , 0.0, 0.0, 0.0 );
gate5 = CreateObject ( 976, 97.1802,1916.7156, 17.3000 , 0.0, 0.0, 90.0 );
return 1;
}
and the commands...
public OnPlayerCommandText(playerid, cmdtext[])
{
if ( strcmp( "/open2", cmdtext, true, 10 ) == 0 ) {
MoveObject ( gate, 68.9110, 1869.6800, 15.9000, 3 ) ;
MoveObject ( gate2, 88.9110, 1869.6800, 15.9000, 3 ) ;
return 1;
}
if ( strcmp( "/close2", cmdtext, true, 10 ) == 0 ) {
MoveObject ( gate, 74.9110, 1869.6800, 15.9000, 3 ) ;
MoveObject ( gate2, 82.8300, 1869.6800, 15.9000, 3 ) ;
return 1;
}
if ( strcmp( "/open3", cmdtext, true, 10 ) == 0 ) {
MoveObject ( gate3, 68.9110, 1810.1826, 15.9000, 3 ) ;
MoveObject ( gate4, 88.9110, 1810.1826, 15.9000, 3 ) ;
return 1;
}
if ( strcmp( "/close3", cmdtext, true, 10 ) == 0 ) {
MoveObject ( gate3, 74.9110, 1810.1826, 15.9000, 3 ) ;
MoveObject ( gate4, 82.8300, 1810.1826, 15.9000, 3 ) ;
return 1;
}
if ( strcmp( "/open1", cmdtext, true, 10 ) == 0 ) {
MoveObject ( gate5, 97.1802,1908.7156, 17.3000, 3 ) ;
return 1;
}
if ( strcmp( "/close1", cmdtext, true, 10 ) == 0 ) {
MoveObject ( gate5, 97.1802,1916.7156, 17.3000, 3 ) ;
return 1;
}
return 0;
}
cheers