Quote:
Originally Posted by Basicz
The best indentation I have ever see =P
pawn Код:
new objGate, // Gamemaker style :P bool: objGateState = false ;
public OnFilterScriptInit( ) { objGate = CreateObject( 987, 1006.49169922, -2104.39648438, 12.14295101, 0.00000000, 0.00000000, 158.46972656 );
return 1; }
public OnFilterScriptExit( ) { DestroyObject( objGate );
return 1; }
public OnPlayerCommandText( playerid, cmdtext[ ] ) { if ( !strcmp( cmdtext, "/openmaingate", true ) ) { if ( PlayerNameIs( playerid, "Chicken0895" ) ) { if ( IsPlayerInRangeOfPoint( playerid, 15.0, 1002.49169922, -2106.39648438, 14.14295101 ) ) { if ( objGateState ) return SendClientMessage( playerid, -1, "Gate is already opened." );
MoveObject( objGate, 1006.49169922, -2104.39648438, 6.14295101, 1.500000 );
objGateState = true; } else return SendClientMessage( playerid, -1, "You aren't near of the gate." ): } else return SendClientMessage( playerid, -1, "You aren't Chicken0985." );
return 1; }
if ( !strcmp( cmdtext, "/closemaingate", true ) ) { if ( PlayerNameIs( playerid, "Chicken0895" ) ) { if ( IsPlayerInRangeOfPoint( playerid, 15.0, 1002.49169922, -2106.39648438, 14.14295101 ) ) { if ( !objGateState ) return SendClientMessage( playerid, -1, "Gate is already closed." );
MoveObject( objGate, 1006.49169922, -2104.39648438, 12.14295101, 1.500000 );
objGateState = false; }
else return SendClientMessage( playerid, -1, "You aren't near of the gate." ): }
else return SendClientMessage( playerid, -1, "You aren't Chicken0985." );
return 1; }
return 0; }
Try this one.
|
Thanks, but then I get all these:
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(6) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(
: error 017: undefined symbol "CreateObject"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(13) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptExit")
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(15) : error 017: undefined symbol "DestroyObject"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(20) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(22) : error 017: undefined symbol "strcmp"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(24) : error 017: undefined symbol "PlayerNameIs"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(26) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(29) : error 017: undefined symbol "SendClientMessage"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(31) : warning 217: loose indentation
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(31) : error 017: undefined symbol "MoveObject"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(35) : error 017: undefined symbol "SendClientMessage"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(35) : warning 217: loose indentation
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(35) : error 029: invalid expression, assumed zero
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(37) : error 017: undefined symbol "SendClientMessage"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(39) : warning 217: loose indentation
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(42) : error 017: undefined symbol "strcmp"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(44) : error 017: undefined symbol "PlayerNameIs"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(46) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(49) : error 017: undefined symbol "SendClientMessage"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(51) : warning 217: loose indentation
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(51) : error 017: undefined symbol "MoveObject"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(56) : error 017: undefined symbol "SendClientMessage"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(56) : warning 217: loose indentation
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(56) : error 029: invalid expression, assumed zero
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(59) : error 017: undefined symbol "SendClientMessage"
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(61) : warning 217: loose indentation
C:\Users\.\Desktop\SA-MP Server\filterscripts\cliffhousegates2.pwn(
: warning 204: symbol is assigned a value that is never used: "objGate"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
18 Errors.