07.04.2013, 21:33
So, im trying to open some prison gates when the password "gov123" is entered, and I screwed up somewhere, ill rep for the answer
Код:
CMD:gate(playerid, params[]) { new subcmd[ 6 ], password; if( sscanf( params, "ss", subcmd, password )) return SendClientMessage( playerid, 0xFFFFFFFF, "/gate [open/close] [password]" ); if( !strcmp( subcmd, "open", true )) { if( !strcmp( password, "gov123", true )) <====ERROR { if(IsPlayerInRangeOfPoint(playerid, 5.0, -2819.3171, 2651.5464, 103.3268)) { MoveObject(pgate1, -2819.3171, 2648.8591, 103.3268, 3.0); return 1; } if(IsPlayerInRangeOfPoint(playerid, 5.0, -2855.7876, 2659.5562, 107.6278)) { MoveObject(pgate2, -2855.7678, 2656.9021, 107.6278, 3.0)); return 0; } } } else { if(IsPlayerInRangeOfPoint(playerid, 5.0, -2819.3171, 2651.5464, 103.3268)) { MoveObject(pgate1, -2819.3171, 2651.5464, 103.3268, 3.0); return 1; } if(IsPlayerInRangeOfPoint(playerid, 5.0, -2855.7876, 2659.5562, 107.6278)) { MoveObject(pgate2, -2855.7678, 2659.5361, 107.6278, 3.0); return 1; } } return true; }